QueuedConnectionManager¶
from acron.net import QueuedConnectionManager
- class QueuedConnectionManager¶
Bases:
Bases:
ConnectionManager,QueuedReturn_PointerTo_ConnectionThis flavor of
ConnectionManagerwill queue up all of the reset-connection messages from theConnectionReadersandConnectionWritersand report them to the client on demand.When a reset connection has been discovered via reset_connection_available()/get_reset_connection(), it is still the responsibility of the client to call
close_connection()on that connection to free up its resources.Inheritance diagram
digraph inheritancebb6a651927 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "ConnectionManager" [URL="acron.net.ConnectionManager.html#acron.net.ConnectionManager",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "ConnectionManager" [arrowsize=0.75,style=""]; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "QueuedConnectionManager" [URL="acron.net.QueuedConnectionManager.html#acron.net.QueuedConnectionManager",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "ConnectionManager" -> "QueuedConnectionManager" [arrowsize=0.75,style=""]; "QueuedReturn_PointerTo_Connection" -> "QueuedConnectionManager" [arrowsize=0.75,style=""]; "QueuedReturn_PointerTo_Connection" [URL="acron.net.QueuedReturn_PointerTo_Connection.html#acron.net.QueuedReturn_PointerTo_Connection",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top"]; "DTOOL_SUPER_BASE" -> "QueuedReturn_PointerTo_Connection" [arrowsize=0.75,style=""]; }- __init__()¶
- get_reset_connection()¶
If a previous call to
reset_connection_available()returned true, this function will return information about the newly reset connection.Only connections which were externally reset are certain to appear in this list. Those which were explicitly closed via a call to
close_connection()may or may not be reported. Furthermore, it is the responsibility of the caller to subsequently callclose_connection()with any connection reported reset by this call. (There is no harm in callingclose_connection()more than once on a given socket.)The return value is true if a connection was successfully returned, or false if there was, in fact, no reset connection. (This may happen if there are multiple threads accessing the
QueuedConnectionManager).
- reset_connection_available()¶
Returns true if one of the readers/writers/listeners reported a connection reset recently. If so, the particular connection that has been reset can be extracted via
get_reset_connection().Only connections which were externally reset are certain to appear in this list. Those which were explicitly closed via a call to
close_connection()may or may not be reported. Furthermore, it is the responsibility of the caller to subsequently callclose_connection()with any connection reported reset by this call. (There is no harm in callingclose_connection()more than once on a given socket.)