Return a connection object connected to the socket given by `address`
(address)
| 638 | |
| 639 | |
| 640 | def SocketClient(address): |
| 641 | ''' |
| 642 | Return a connection object connected to the socket given by `address` |
| 643 | ''' |
| 644 | family = address_type(address) |
| 645 | with socket.socket( getattr(socket, family) ) as s: |
| 646 | s.setblocking(True) |
| 647 | s.connect(address) |
| 648 | return Connection(s.detach()) |
| 649 | |
| 650 | # |
| 651 | # Definitions for connections based on named pipes |
no test coverage detected