asyncore.dispatcher.close()

close() Close the socket. All future operations on the socket object will fail. The remote end-point will receive no more data (after queued data is flushed). Sockets are automatically closed when they are garbage-collected.

asyncore.dispatcher.bind()

bind(address) Bind the socket to address. The socket must not already be bound. (The format of address depends on the address family — refer to the socket documentation for more information.) To mark the socket as re-usable (setting the SO_REUSEADDR option), call the dispatcher object’s set_reuse_addr() method.

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

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

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.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.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.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_size()

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

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.