tornado.tcpclient
— IOStream
connection factory¶
A non-blocking TCP connection factory.
-
class
tornado.tcpclient.
TCPClient
(resolver=None, io_loop=None)[源代码]¶ A non-blocking TCP connection factory.
在 4.1 版更改: The
io_loop
argument is deprecated.-
connect
(host, port, af=<AddressFamily.AF_UNSPEC: 0>, ssl_options=None, max_buffer_size=None)[源代码]¶ Connect to the given host and port.
Asynchronously returns an
IOStream
(orSSLIOStream
ifssl_options
is not None).
-