MCPcopy Index your code
hub / github.com/python/cpython / socketpair

Function socketpair

Lib/socket.py:668–677  ·  view source on GitHub ↗
(family=None, type=SOCK_STREAM, proto=0)

Source from the content-addressed store, hash-verified

666
667if hasattr(_socket, "socketpair"):
668 def socketpair(family=None, type=SOCK_STREAM, proto=0):
669 if family is None:
670 try:
671 family = AF_UNIX
672 except NameError:
673 family = AF_INET
674 a, b = _socket.socketpair(family, type, proto)
675 a = socket(family, type, proto, a.detach())
676 b = socket(family, type, proto, b.detach())
677 return a, b
678
679else:
680 socketpair = _fallback_socketpair

Callers

nothing calls this directly

Calls 3

socketClass · 0.70
socketpairMethod · 0.45
detachMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…