MCPcopy Index your code
hub / github.com/RustPython/RustPython / close

Method close

Lib/http/client.py:1035–1047  ·  view source on GitHub ↗

Close the connection to the HTTP server.

(self)

Source from the content-addressed store, hash-verified

1033 self._tunnel()
1034
1035 def close(self):
1036 """Close the connection to the HTTP server."""
1037 self.__state = _CS_IDLE
1038 try:
1039 sock = self.sock
1040 if sock:
1041 self.sock = None
1042 sock.close() # close it manually... there may be other refs
1043 finally:
1044 response = self.__response
1045 if response:
1046 self.__response = None
1047 response.close()
1048
1049 def send(self, data):
1050 """Send 'data' to the server.

Callers 7

_tunnelMethod · 0.95
getresponseMethod · 0.95
test_response_filenoMethod · 0.95
testTimeoutAttributeMethod · 0.95
run_clientMethod · 0.95

Calls 1

closeMethod · 0.45

Tested by 5

test_response_filenoMethod · 0.76
testTimeoutAttributeMethod · 0.76
run_clientMethod · 0.76