NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection Struct Reference

#include <unified_network.h>


Detailed Description

The connection structure.

Definition at line 261 of file unified_network.h.

Public Member Functions

uint64 getAppId ()
void reset ()
void setAppId (uint64 appid)
 TConnection (CCallbackNetBase *cbnb, TSockId hi)
 TConnection (CCallbackClient *cbc)
 TConnection ()
bool valid ()

Data Fields

CCallbackNetBaseCbNetBase
 If it s a client connection, it's the client connection otherwise it s the server connection.

TSockId HostId
 If it s a server connection, it's the host id, it s InvalidId if it s a client.

bool IsServerConnection
 If the current service is connect to the other service as a server or a client.


Constructor & Destructor Documentation

NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::TConnection  )  [inline]
 

Definition at line 270 of file unified_network.h.

References CbNetBase, HostId, and IsServerConnection.

00270 : IsServerConnection(false), CbNetBase(NULL), HostId(InvalidSockId) { }

NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::TConnection CCallbackClient cbc  )  [inline]
 

Definition at line 271 of file unified_network.h.

References CbNetBase, HostId, and IsServerConnection.

00271 : IsServerConnection(false), CbNetBase(cbc), HostId(InvalidSockId) { }

NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::TConnection CCallbackNetBase cbnb,
TSockId  hi
[inline]
 

Definition at line 272 of file unified_network.h.

References CbNetBase, HostId, IsServerConnection, and NLNET::TSockId.

00272 : IsServerConnection(true), CbNetBase(cbnb), HostId(hi) { }


Member Function Documentation

uint64 NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::getAppId  )  [inline]
 

Definition at line 275 of file unified_network.h.

References NLNET::CBufSock::appId(), CbNetBase, NLNET::CCallbackNetBase::getSockId(), HostId, and uint64.

00275 { return CbNetBase->getSockId (HostId)->appId (); }

void NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::reset void   )  [inline]
 

Definition at line 285 of file unified_network.h.

References CbNetBase, NLNET::CCallbackNetBase::disconnect(), HostId, and IsServerConnection.

00286                         {
00287                                 if (CbNetBase != 0)
00288                                 {
00289                                         if (IsServerConnection)
00290                                         {
00291                                                 if (HostId != InvalidSockId)
00292                                                         CbNetBase->disconnect (HostId);
00293                                         }
00294                                         else
00295                                         {
00296                                                 CbNetBase->disconnect ();
00297                                                 delete CbNetBase;
00298                                         }
00299                                 }
00300                                 CbNetBase = 0;
00301                                 IsServerConnection = false;
00302                                 HostId = InvalidSockId;
00303                         }

void NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::setAppId uint64  appid  )  [inline]
 

Definition at line 274 of file unified_network.h.

References CbNetBase, NLNET::CCallbackNetBase::getSockId(), HostId, NLNET::CBufSock::setAppId(), and uint64.

00274 { CbNetBase->getSockId (HostId)->setAppId (appid); }

bool NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::valid  )  [inline]
 

Definition at line 277 of file unified_network.h.

References CbNetBase, HostId, and IsServerConnection.

00278                         {
00279                                 if(IsServerConnection)
00280                                         return CbNetBase != 0 && HostId != InvalidSockId;
00281                                 else
00282                                         return CbNetBase != 0;
00283                         }


Field Documentation

CCallbackNetBase* NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::CbNetBase
 

If it s a client connection, it's the client connection otherwise it s the server connection.

Definition at line 266 of file unified_network.h.

Referenced by getAppId(), reset(), setAppId(), TConnection(), and valid().

TSockId NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::HostId
 

If it s a server connection, it's the host id, it s InvalidId if it s a client.

Definition at line 268 of file unified_network.h.

Referenced by getAppId(), reset(), setAppId(), TConnection(), and valid().

bool NLNET::CUnifiedNetwork::CUnifiedConnection::TConnection::IsServerConnection
 

If the current service is connect to the other service as a server or a client.

Definition at line 264 of file unified_network.h.

Referenced by reset(), TConnection(), and valid().


The documentation for this struct was generated from the following file:
Generated on Tue Mar 16 14:07:20 2004 for NeL by doxygen 1.3.6