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

Method client

Lib/test/test_asyncio/test_events.py:865–878  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

863 expected_response = b'roger'
864
865 def client():
866 nonlocal response
867 try:
868 csock = socket.socket()
869 if client_ssl is not None:
870 csock = client_ssl.wrap_socket(csock)
871 csock.connect(addr)
872 csock.sendall(message)
873 response = csock.recv(99)
874 csock.close()
875 except Exception as exc:
876 print(
877 "Failure in client thread in test_connect_accepted_socket",
878 exc)
879
880 thread = threading.Thread(target=client, daemon=True)
881 thread.start()

Callers

nothing calls this directly

Calls 6

socketMethod · 0.80
wrap_socketMethod · 0.80
connectMethod · 0.45
sendallMethod · 0.45
recvMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected