socket.socketpair([family[, type[, proto]]])
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.
The newly created sockets are non-inheritable.
Changed in version 3.2: The returned socket objects now support the whole socket API, rather than a subset.
Chan