dtNetGM::ServerConnectionListener Class Reference

This class is used as an interface to the GNE::Server connection. More...

#include <serverconnectionlistener.h>

List of all members.

Public Types

typedef GNE::SmartPtr
< ServerConnectionListener
sptr
typedef GNE::WeakPtr
< ServerConnectionListener
wptr

Public Member Functions

 ServerConnectionListener (ServerNetworkComponent *serverNetworkComp, int inRate, int outRate, bool reliable)
 Construct a ServerConnectionListener.
virtual ~ServerConnectionListener (void)
virtual void getNewConnectionParams (GNE::ConnectionParams &params)
virtual void onListenFailure (const GNE::Error &error, const GNE::Address &from, const GNE::ConnectionListener::sptr &listener)
virtual void onListenSuccess (const GNE::ConnectionListener::sptr &listener)

Static Public Member Functions

static sptr Create (ServerNetworkComponent *serverNetworkComp, int inRate, int outRate, bool reliable)
 Method used to create a new instance of ServerConnectionListener.

Protected Attributes

int mInRate
int mOutRate
 The incoming bandwidth rate.
bool mReliable
 The outgoing bandwidth rate.
dtCore::RefPtr
< ServerNetworkComponent
mServerNetworkcomponent
 The reliability of the connection.
GNE::Mutex mMutex


Detailed Description

This class is used as an interface to the GNE::Server connection.

It is used internally by the ServerNetworkComponent and is typically not used directly by the end user. This class takes in a reference to a ServerNetworkComponent and calls it's virtual methods to mimic the GNE::ServerConnectionLister's callbacks.


Member Typedef Documentation

typedef GNE::SmartPtr<ServerConnectionListener> dtNetGM::ServerConnectionListener::sptr

typedef GNE::WeakPtr<ServerConnectionListener> dtNetGM::ServerConnectionListener::wptr


Constructor & Destructor Documentation

dtNetGM::ServerConnectionListener::ServerConnectionListener ( ServerNetworkComponent serverNetworkComp,
int  inRate,
int  outRate,
bool  reliable 
)

Construct a ServerConnectionListener.

Parameters:
serverNetworkComp : instance of a ServerNetworkComponent
inRate : the incoming bandwidth throttle
outRate : the outgoing bandwidth throttle
reliable : reliability of the Network connection

dtNetGM::ServerConnectionListener::~ServerConnectionListener ( void   )  [virtual]


Member Function Documentation

static sptr dtNetGM::ServerConnectionListener::Create ( ServerNetworkComponent serverNetworkComp,
int  inRate,
int  outRate,
bool  reliable 
) [inline, static]

Method used to create a new instance of ServerConnectionListener.

void dtNetGM::ServerConnectionListener::getNewConnectionParams ( GNE::ConnectionParams &  params  )  [virtual]

void dtNetGM::ServerConnectionListener::onListenFailure ( const GNE::Error &  error,
const GNE::Address &  from,
const GNE::ConnectionListener::sptr &  listener 
) [virtual]

void dtNetGM::ServerConnectionListener::onListenSuccess ( const GNE::ConnectionListener::sptr &  listener  )  [virtual]


Member Data Documentation

int dtNetGM::ServerConnectionListener::mInRate [protected]

int dtNetGM::ServerConnectionListener::mOutRate [protected]

The incoming bandwidth rate.

bool dtNetGM::ServerConnectionListener::mReliable [protected]

The outgoing bandwidth rate.

dtCore::RefPtr<ServerNetworkComponent> dtNetGM::ServerConnectionListener::mServerNetworkcomponent [protected]

The reliability of the connection.

GNE::Mutex dtNetGM::ServerConnectionListener::mMutex [protected]


http://www.delta3d.org
2.0.0 generated 14 Feb 2008