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.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

class asyncore.dispatcher The dispatcher class is a thin wrapper around a low-level socket object. To make it more useful, it has a few methods for event-handling which are called from the asynchronous loop. Otherwise, it can be treated as a normal non-blocking socket object. The firing of low-level events at certain times or in certain connection states tells the asynchronous loop that certain higher-level events have taken place. For example, if we have asked for a socket to connect to ano

asyncore.dispatcher.accept()

accept() Accept a connection. The socket must be bound to an address and listening for connections. The return value can be either None or a pair (conn, address) where conn is a new socket object usable to send and receive data on the connection, and address is the address bound to the socket on the other end of the connection. When None is returned it means the connection didn’t take place, in which case the server should just ignore this event and keep listening for further incoming connec

asyncio.WriteTransport.write_eof()

write_eof() Close the write end of the transport after flushing buffered data. Data may still be received. This method can raise NotImplementedError if the transport (e.g. SSL) doesn’t support half-closes.

asyncio.WriteTransport.write()

write(data) Write some data bytes to the transport. This method does not block; it buffers the data and arranges for it to be sent out asynchronously.

asyncio.WriteTransport.get_write_buffer_size()

get_write_buffer_size() Return the current size of the output buffer used by the transport.

asyncio.WriteTransport.writelines()

writelines(list_of_data) Write a list (or any iterable) of data bytes to the transport. This is functionally equivalent to calling write() on each element yielded by the iterable, but may be implemented more efficiently.

asyncio.WriteTransport.set_write_buffer_limits()

set_write_buffer_limits(high=None, low=None) Set the high- and low-water limits for write flow control. These two values control when call the protocol’s pause_writing() and resume_writing() methods are called. If specified, the low-water limit must be less than or equal to the high-water limit. Neither high nor low can be negative. The defaults are implementation-specific. If only the high-water limit is given, the low-water limit defaults to an implementation-specific value less than or eq

asyncio.WriteTransport.get_write_buffer_limits()

get_write_buffer_limits() Get the high- and low-water limits for write flow control. Return a tuple (low, high) where low and high are positive number of bytes. Use set_write_buffer_limits() to set the limits. New in version 3.4.2.