MCPcopy Index your code
hub / github.com/RustPython/RustPython / client

Method client

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected