Transport is responsible for managing the underlying socket,
registering for socket events, dispatching read, write, and errors to
higher layers. It is analogous to asyncore.dispatcher and is a drop in
replacement for most purposes.
If the alternate_poller is specified on instantiation, then the
connection will register for events on that poller as opposed to the
global poller.
|
__init__(self,
alternate_poller=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
close(self)
close the underlying socket connection and unregister this Transport
from the underlying poller |
source code
|
|
|
connect(self,
address)
begin establishing a connection to the (host, port) address tuple. |
source code
|
|
|
create_socket(self,
family,
type)
Creates the underlying non-blocking socket and associates it with
this Transport's underlying poller |
source code
|
|
|
handle_close(self)
callback fired when the socket is closed |
source code
|
|
|
handle_connect(self)
callback fired when connection is established |
source code
|
|
|
handle_connect_event(self)
called internally when the socket becomes connected |
source code
|
|
|
handle_error(self)
callback fired if a non-recoverable exception is raised |
source code
|
|
|
handle_read(self)
callback fired when the socket has data available |
source code
|
|
|
|
|
|
|
|
|
set_socket(self,
sock)
mirror the given Socket sock's file descriptor on the Transport and
register this Transport with the underlying poller |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|