socket — Low-level networking interface — Python 3.11.16 documentation

docs.python.org

Tin mới

Developing with asyncio

ssl — TLS/SSL wrapper for socket objects

Python Module Index

3.11.16 Documentation

The Python Standard Library

Networking and Interprocess Communication

WebAssembly platforms

This module does not work or is not available on WebAssembly platforms wasm32-emscripten and wasm32-wasi. See WebAssembly platforms for more information.

socketserver: A framework for network servers.

struct: Interpret bytes as packed binary data.

subprocess.Popen()

On Windows, the file-like object created by makefile() cannot be used where a file object with a file descriptor is expected, such as the stream arguments of subprocess.Popen().

Socket Programming HOWTO

Changed in version 3.5: If the system call is interrupted and the signal handler does not raise an exception, the method now retries the system call instead of raising an InterruptedError exception (see PEP 475 for the r

bytes-like objects

The following function sends the list of file descriptors fds over an AF_UNIX socket, on systems which support the SCM_RIGHTS mechanism. See also recvmsg().

select: Wait for I/O completion on multiple streams.

In non-blocking mode, operations fail (with an error that is unfortunately system-dependent) if they cannot be completed immediately: functions from the select module can be used to know when and whether a socket is avai

Timeouts and the accept method¶

If getdefaulttimeout() is not None, sockets returned by the accept() method inherit that timeout. Otherwise, the behaviour depends on settings of the listening socket: