![]() |
Home · Modules · Classes · Namespaces · Functions |
The QxtAbstractConnectionManager class is an interface for classes that maintain connection pools More...
#include <QxtAbstractConnectionManager>
Inherits QObject.
Inherited by QxtTcpConnectionManager.
The QxtAbstractConnectionManager class is an interface for classes that maintain connection pools
QxtAbstractConnectionManager is a standardized interface for accepting and tracking incoming connections.
Each incoming connection is assigned an arbitrary, opaque client ID number. This number can be used to retrieve the QIODevice associated with it. A list of IDs for all current connections can be retrieved with the clients() function.
As an abstract class, QxtAbstractConnectionManager cannot be used on its own. Subclasses must implement isAcceptingConnections() to indicate the current listening status of the connection manager and removeConnection() to perform necessary clean-up of an established connection before disconnecting. Finally, a subclass must invoke addConnection() after a new incoming connection has been established and prepared.
See also QxtTcpConnectionManager.
Constructs a QxtAbstractConnectionManager object with the specified parent.
Destructs the connection manager.
Begins managing a connection. Each device must have a unique, non-zero clientID, but beyond this constraint implementations may use any convenient value. Implementations should invoke this function after establishing a usable connection and performing any desired initial negotiation.
This function will emit the newConnection signal after the internal data structures have been suitably updated.
Returns the QIODevice for the requested clientID.
Returns the number of connected clients.
Returns a list of client IDs for all connected clients.
Disconnects the connection with the specified clientID.
Implementations should invoke this function when the connection should no longer be used; for instance, when the QIODevice object is destroyed or the connection has been closed. Code that uses the connection manager service should invoke this function to close a connection on demand.
Copyright © 2007-2010 Qxt Foundation |
Qxt 0.6.1 |