asyncore.dispatcher.handle_write()

handle_write() Called when the asynchronous loop detects that a writable socket can be written. Often this method will implement the necessary buffering for performance. For example: def handle_write(self): sent = self.send(self.buffer) self.buffer = self.buffer[sent:]

asyncore.dispatcher.handle_read()

handle_read() Called when the asynchronous loop detects that a read() call on the channel’s socket will succeed.

asyncore.dispatcher.handle_expt()

handle_expt() Called when there is out of band (OOB) data for a socket connection. This will almost never happen, as OOB is tenuously supported and rarely used.

asyncore.dispatcher.handle_error()

handle_error() Called when an exception is raised and not otherwise handled. The default version prints a condensed traceback.

asyncore.dispatcher.handle_connect()

handle_connect() Called when the active opener’s socket actually makes a connection. Might send a “welcome” banner, or initiate a protocol negotiation with the remote endpoint, for example.

asyncore.dispatcher.handle_close()

handle_close() Called when the socket is closed.

asyncore.dispatcher.handle_accepted()

handle_accepted(sock, addr) Called on listening channels (passive openers) when a connection has been established with a new remote endpoint that has issued a connect() call for the local endpoint. sock is a new socket object usable to send and receive data on the connection, and addr is the address bound to the socket on the other end of the connection. New in version 3.2.

asyncore.dispatcher.handle_accept()

handle_accept() Called on listening channels (passive openers) when a connection can be established with a new remote endpoint that has issued a connect() call for the local endpoint. Deprecated in version 3.2; use handle_accepted() instead. Deprecated since version 3.2.

asyncore.dispatcher.create_socket()

create_socket(family=socket.AF_INET, type=socket.SOCK_STREAM) This is identical to the creation of a normal socket, and will use the same options for creation. Refer to the socket documentation for information on creating sockets. Changed in version 3.3: family and type arguments can be omitted.

asyncore.dispatcher.connect()

connect(address) As with the normal socket object, address is a tuple with the first element the host to connect to, and the second the port number.