panda3d.core.QueuedConnectionManager

from panda3d.core import QueuedConnectionManager
class QueuedConnectionManager

Bases: ConnectionManager, QueuedReturn_PointerTo_Connection

This flavor of ConnectionManager will queue up all of the reset-connection messages from the ConnectionReaders and ConnectionWriters and report them to the client on demand.

When a reset connection has been discovered via resetConnectionAvailable()/getResetConnection(), it is still the responsibility of the client to call close_connection() on that connection to free up its resources.

Inheritance diagram

Inheritance diagram of QueuedConnectionManager

__init__() → None
resetConnectionAvailable() → bool

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

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 call close_connection() with any connection reported reset by this call. (There is no harm in calling close_connection() more than once on a given socket.)

getResetConnection(connection: PointerTo_Connection) → bool

If a previous call to resetConnectionAvailable() 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 call close_connection() with any connection reported reset by this call. (There is no harm in calling close_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).