(func, *args)
| 1110 | sslobj = client_sslctx_2.wrap_bio(incoming, outgoing) |
| 1111 | |
| 1112 | def do(func, *args): |
| 1113 | while True: |
| 1114 | try: |
| 1115 | rv = func(*args) |
| 1116 | break |
| 1117 | except ssl.SSLWantReadError: |
| 1118 | if outgoing.pending: |
| 1119 | sock.send(outgoing.read()) |
| 1120 | incoming.write(sock.recv(65536)) |
| 1121 | if outgoing.pending: |
| 1122 | sock.send(outgoing.read()) |
| 1123 | return rv |
| 1124 | |
| 1125 | do(sslobj.do_handshake) |
| 1126 |