Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Closed
Labels
docsDocumentation in the Doc dir
@furkanonder

Description

@furkanonder

Documentation

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

import socket# the public network interfaceHOST = socket.gethostbyname(socket.gethostname())# create a raw socket and bind it to the public interfaces = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_IP)s.bind((HOST, 0))# Include IP headerss.setsockopt(socket.IPPROTO_IP, socket.IP_HDRINCL, 1)# receive all packagess.ioctl(socket.SIO_RCVALL, socket.RCVALL_ON)# receive a packageprint(s.recvfrom(65565))# disabled promiscuous modes.ioctl(socket.SIO_RCVALL, socket.RCVALL_OFF)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp