Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] socket documentation: "packages" -> "packets" #93183

Closed
furkanonder opened this issue May 24, 2022 · 0 comments · Fixed by #93832
Closed

[docs] socket documentation: "packages" -> "packets" #93183

furkanonder opened this issue May 24, 2022 · 0 comments · Fixed by #93832
Labels
docs

Comments

@furkanonder
Copy link
Contributor

@furkanonder furkanonder commented May 24, 2022

Documentation

In the example of the socket.rst, the comment # receive all packages should be changed to # receive all packets and the comment receive a package should be changed to receive a packet.

import socket

# the public network interface
HOST = socket.gethostbyname(socket.gethostname())

# create a raw socket and bind it to the public interface
s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)
s.bind((HOST, 0))

# Include IP headers
s.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1)

# receive all packages
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON)

# receive a package
print(s.recvfrom(65565))

# disabled promiscuous mode
s.ioctl(socket.SIO_RCVALL, socket.RCVALL_OFF)
@furkanonder furkanonder added the docs label May 24, 2022
@erlend-aasland erlend-aasland linked a pull request May 24, 2022 that will close this issue
erlend-aasland added a commit to erlend-aasland/cpython that referenced this issue Jun 15, 2022
package => packet

Co-authored-by: Victor Norman
erlend-aasland added a commit that referenced this issue Jun 15, 2022
package => packet

Co-authored-by: Victor Norman
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 15, 2022
package => packet

Co-authored-by: Victor Norman
(cherry picked from commit cdd3984)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 15, 2022
package => packet

Co-authored-by: Victor Norman
(cherry picked from commit cdd3984)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Jun 15, 2022
package => packet

Co-authored-by: Victor Norman
(cherry picked from commit cdd3984)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
miss-islington added a commit that referenced this issue Jun 15, 2022
package => packet

Co-authored-by: Victor Norman
(cherry picked from commit cdd3984)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs
Projects
None yet
1 participant