MCPcopy Create free account
hub / github.com/EasyIME/PIME / connect

Method connect

python/python3/tornado/test/web_test.py:2274–2283  ·  view source on GitHub ↗
(self, url, connection_close)

Source from the content-addressed store, hash-verified

2272 ]
2273
2274 def connect(self, url, connection_close):
2275 # Use a raw connection so we can control the sending of data.
2276 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
2277 s.connect(("127.0.0.1", self.get_http_port()))
2278 stream = IOStream(s)
2279 stream.write(b"GET " + url + b" HTTP/1.1\r\n")
2280 if connection_close:
2281 stream.write(b"Connection: close\r\n")
2282 stream.write(b"Transfer-Encoding: chunked\r\n\r\n")
2283 return stream
2284
2285 @gen_test
2286 def test_streaming_body(self):

Callers 5

test_streaming_bodyMethod · 0.95
test_early_returnMethod · 0.95
test_connection_closeMethod · 0.45

Calls 3

IOStreamClass · 0.90
get_http_portMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected