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

Method serve

Lib/test/test_asyncio/test_sslproto.py:292–305  ·  view source on GitHub ↗
(sock)

Source from the content-addressed store, hash-verified

290 client_context = test_utils.simple_client_sslcontext()
291
292 def serve(sock):
293 sock.settimeout(self.TIMEOUT)
294
295 data = sock.recv_all(len(HELLO_MSG))
296 self.assertEqual(len(data), len(HELLO_MSG))
297
298 sock.start_tls(server_context, server_side=True)
299
300 sock.sendall(b'O')
301 data = sock.recv_all(len(HELLO_MSG))
302 self.assertEqual(len(data), len(HELLO_MSG))
303
304 sock.shutdown(socket.SHUT_RDWR)
305 sock.close()
306
307 class ClientProto(asyncio.Protocol):
308 def __init__(self, on_data, on_eof):

Callers

nothing calls this directly

Calls 9

lenFunction · 0.85
settimeoutMethod · 0.45
recv_allMethod · 0.45
assertEqualMethod · 0.45
start_tlsMethod · 0.45
sendallMethod · 0.45
shutdownMethod · 0.45
closeMethod · 0.45
call_soon_threadsafeMethod · 0.45

Tested by

no test coverage detected