GWE::GXmlDirectNetworkConnection Class Reference

Wrapper for TCP sockets, adds identification. More...

#include <GXmlDirectNetwork.h>

Collaboration diagram for GWE::GXmlDirectNetworkConnection:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

Wrapper for TCP sockets, adds identification.

Author:
Raphael Langerhorst
Todo:
redesign - receive data directly here and use buffers for partial messages


Constructor & Destructor Documentation

GWE::GXmlDirectNetworkConnection::GXmlDirectNetworkConnection ( QTcpSocket *  socket,
const QString &  id = QString() 
)

Constructor.

Parameters:
id the name of the connection, usually empty and set after peer has identified

GWE::GXmlDirectNetworkConnection::~GXmlDirectNetworkConnection (  )  [virtual]

Virtual Destructor.


Member Function Documentation

QString GWE::GXmlDirectNetworkConnection::getConnectionName (  )  const

Returns:
identification of the connection.

QTcpSocket * GWE::GXmlDirectNetworkConnection::getSocket (  ) 

Returns:
TCP socket of the connection.

void GWE::GXmlDirectNetworkConnection::setConnectionName ( const QString &  id  ) 

Set the identification of the connection.


Member Data Documentation

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.


The documentation for this class was generated from the following files:
Generated on Thu Nov 16 07:49:39 2006 for G System by  doxygen 1.4.7