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

Function Client

Lib/multiprocessing/connection.py:540–558  ·  view source on GitHub ↗

Returns a connection to the address of a `Listener`

(address, family=None, authkey=None)

Source from the content-addressed store, hash-verified

538
539
540def Client(address, family=None, authkey=None):
541 '''
542 Returns a connection to the address of a `Listener`
543 '''
544 family = family or address_type(address)
545 _validate_family(family)
546 if family == 'AF_PIPE':
547 c = PipeClient(address)
548 else:
549 c = SocketClient(address)
550
551 if authkey is not None and not isinstance(authkey, bytes):
552 raise TypeError('authkey should be a byte string')
553
554 if authkey is not None:
555 answer_challenge(c, authkey)
556 deliver_challenge(c, authkey)
557
558 return c
559
560
561if sys.platform != 'win32':

Callers 4

XmlClientFunction · 0.70
connectMethod · 0.70
get_connectionMethod · 0.70
stopMethod · 0.70

Calls 6

address_typeFunction · 0.85
_validate_familyFunction · 0.85
PipeClientFunction · 0.85
SocketClientFunction · 0.85
answer_challengeFunction · 0.85
deliver_challengeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…