Close the connection to the HTTP server.
(self)
| 972 | self._tunnel() |
| 973 | |
| 974 | def close(self): |
| 975 | """Close the connection to the HTTP server.""" |
| 976 | self.__state = _CS_IDLE |
| 977 | try: |
| 978 | sock = self.sock |
| 979 | if sock: |
| 980 | self.sock = None |
| 981 | sock.close() # close it manually... there may be other refs |
| 982 | finally: |
| 983 | response = self.__response |
| 984 | if response: |
| 985 | self.__response = None |
| 986 | response.close() |
| 987 | |
| 988 | def send(self, data): |
| 989 | """Send `data' to the server. |
no test coverage detected