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

Method prog

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

Source from the content-addressed store, hash-verified

232 fut = asyncio.Future()
233
234 def prog(sock):
235 try:
236 sock.starttls(client_sslctx)
237 sock.connect(addr)
238 sock.send(A_DATA)
239
240 data = sock.recv_all(2)
241 self.assertEqual(data, b'OK')
242
243 sock.send(B_DATA)
244 data = sock.recv_all(4)
245 self.assertEqual(data, b'SPAM')
246
247 sock.close()
248
249 except Exception as ex:
250 self.loop.call_soon_threadsafe(fut.set_exception, ex)
251 else:
252 self.loop.call_soon_threadsafe(fut.set_result, None)
253
254 client = self.tcp_client(prog)
255 client.start()

Callers

nothing calls this directly

Calls 8

wrap_bioMethod · 0.80
starttlsMethod · 0.45
connectMethod · 0.45
sendMethod · 0.45
recv_allMethod · 0.45
assertEqualMethod · 0.45
closeMethod · 0.45
call_soon_threadsafeMethod · 0.45

Tested by

no test coverage detected