#include <GXmlDirectNetwork.h>
Collaboration diagram for GWE::GXmlDirectNetworkConnection:

Public Member Functions | |
| GXmlDirectNetworkConnection (QTcpSocket *socket, const QString &id=QString()) | |
| virtual | ~GXmlDirectNetworkConnection () |
| void | setConnectionName (const QString &id) |
| QString | getConnectionName () const |
| QTcpSocket * | getSocket () |
Protected Attributes | |
| QTcpSocket * | Socket |
| QString | ConnectionName |
| GWE::GXmlDirectNetworkConnection::GXmlDirectNetworkConnection | ( | QTcpSocket * | socket, | |
| const QString & | id = QString() | |||
| ) |
Constructor.
| id | the name of the connection, usually empty and set after peer has identified |
| GWE::GXmlDirectNetworkConnection::~GXmlDirectNetworkConnection | ( | ) | [virtual] |
Virtual Destructor.
| QString GWE::GXmlDirectNetworkConnection::getConnectionName | ( | ) | const |
| QTcpSocket * GWE::GXmlDirectNetworkConnection::getSocket | ( | ) |
| void GWE::GXmlDirectNetworkConnection::setConnectionName | ( | const QString & | id | ) |
Set the identification of the connection.
QString GWE::GXmlDirectNetworkConnection::ConnectionName [protected] |
The identification of the connection. Usually a new incoming connection from the Server does not have a valied peerName(), thus this class is used to wrap such sockets into identifyable objects.
After identification is received from the peer, ConnectionName is set and the connection can be used.
QTcpSocket* GWE::GXmlDirectNetworkConnection::Socket [protected] |
The actual TCP socket.
1.4.7