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