ID EN
Socket

socketpair

Python 3.11

Build a pair of connected socket objects using the given address family, socket type, and protocol number. Address family, socket type, and protocol number are as for the socket() function above. The default family is AF_UNIX if defined on the platform; otherwise, the default is AF_INET.

Syntax

PYTHON
socket.socketpair([family[, type[, proto]]])

See Also

socket() AF_UNIX AF_INET non-inheritable