(self, *args)
| 127 | |
| 128 | # Context management protocol: try to quit() if active |
| 129 | def __exit__(self, *args): |
| 130 | if self.sock is not None: |
| 131 | try: |
| 132 | self.quit() |
| 133 | except (OSError, EOFError): |
| 134 | pass |
| 135 | finally: |
| 136 | if self.sock is not None: |
| 137 | self.close() |
| 138 | |
| 139 | def connect(self, host='', port=0, timeout=-999, source_address=None): |
| 140 | '''Connect to host. Arguments are: |