![]() |
Home · Modules · Classes · Namespaces · Functions |
The QxtTcpConnectionManager class accepts TCP connections and maintains a connection pool More...
#include <QxtTcpConnectionManager>
Inherits QxtAbstractConnectionManager.
The QxtTcpConnectionManager class accepts TCP connections and maintains a connection pool
QxtTcpConnectionManager is a standardized interface for accepting and tracking incoming TCP connections.
Each incoming connection is assigned an arbitrary, opaque client ID number. This number can be used to retrieve the QTcpSocket associated with it. A list of IDs for all current connections can be retrieved with the clients() function.
Like QTcpServer, QxtTcpConnectionManager can listen for incoming connections on a specified interface and port, and like QTcpServer you may override the incomingConnection() function to change the handling of new connections. This is, for instance, where you would create a QSslSocket to encrypt communications.
See also QTcpServer.
Constructs a new QxtTcpConnectionManager object with the specified parent.
This function is called when a new TCP connection becomes available. The parameter is the native socketDescriptor for the connection, suitable for use in QTcpSocket::setSocketDescriptor.
The default implementation returns a new QTcpSocket with the specified descriptor. Subclasses may return QTcpSocket subclasses, such as QSslSocket.
Listens on the specified interface iface on the specified port for connections. If iface is QHostAddress::Any, listens on all interfaces.
Returns true on success; otherwise returns false.
Returns the proxy in use for the connection manager.
See also setProxy() and QTcpServer::proxy().
Sets an explicit network proxy for the connection manager.
See also proxy() and QTcpServer::setProxy().
Stops listening for connections. Any connections still open will remain connected.
Copyright © 2007-2010 Qxt Foundation |
Qxt 0.6.1 |