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

Method server

Lib/test/test_asyncio/test_ssl.py:307–320  ·  view source on GitHub ↗
(sock)

Source from the content-addressed store, hash-verified

305 client_sslctx = self._create_client_ssl_context()
306
307 def server(sock):
308 sock.starttls(
309 sslctx,
310 server_side=True)
311
312 data = sock.recv_all(len(A_DATA))
313 self.assertEqual(data, A_DATA)
314 sock.send(b'OK')
315
316 data = sock.recv_all(len(B_DATA))
317 self.assertEqual(data, B_DATA)
318 sock.send(b'SPAM')
319
320 sock.close()
321
322 async def client(addr):
323 reader, writer = await asyncio.open_connection(

Callers

nothing calls this directly

Calls 15

wrap_bioMethod · 0.80
wrap_socketMethod · 0.80
starttlsMethod · 0.45
recv_allMethod · 0.45
assertEqualMethod · 0.45
sendMethod · 0.45
closeMethod · 0.45
connectMethod · 0.45
recvMethod · 0.45
dupMethod · 0.45
sendallMethod · 0.45

Tested by

no test coverage detected