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

Method prog

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

Source from the content-addressed store, hash-verified

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