dtNetGM::NetworkBridge Class Reference

contains GNE components for communication across a network This class represents a single host on the other side of the network More...

#include <networkbridge.h>

Inheritance diagram for dtNetGM::NetworkBridge:

dtCore::Base

List of all members.

Public Member Functions

 NetworkBridge (NetworkComponent *networkComp)
virtual ~NetworkBridge (void)
void SetMachineInfo (const dtGame::MachineInfo &machineInfo)
 Sets the MachineInfo.
const dtGame::MachineInfoGetMachineInfo () const
 Gets the MachineInfo from the host.
const bool IsNetworkConnected ()
 Returns if the networkbridge is connected.
const bool IsConnectedClient () const
 Returns if the networkbridge is connected as an accepted client to a server.
void SetClientConnected (bool client=true)
 Sets if the networkbridge is an accepted client.
void SendDataStream (dtUtil::DataStream &dataStream)
 Sends a DataStream across the network.
void Disconnect (int waitTime=-1)
 Disconnects the current connection.
void OnNewConnection (GNE::SyncConnection &conn)
 Callback function for GNE::ConnectionListener.
void OnConnect (GNE::SyncConnection &conn)
 Callback function for GNE::ConnectionListener.
void OnReceive (GNE::Connection &conn)
 Callback function for GNE::ConnectionListener.
void OnDisconnect (GNE::Connection &conn)
 Callback function for GNE::ConnectionListener.
void OnExit (GNE::Connection &conn)
 Callback function for GNE::ConnectionListener.
void OnFailure (GNE::Connection &conn, const GNE::Error &error)
 Callback function for GNE::ConnectionListener.
void OnError (GNE::Connection &conn, const GNE::Error &error)
 Callback function for GNE::ConnectionListener.
void OnConnectFailure (GNE::Connection &conn, const GNE::Error &error)
 Callback function for GNE::ConnectionListener.
void OnTimeout (GNE::Connection &conn)
 Callback function for GNE::ConnectionListener.
std::string GetHostDescription ()
 Returns a string describing the host.


Detailed Description

contains GNE components for communication across a network This class represents a single host on the other side of the network

Constructor & Destructor Documentation

dtNetGM::NetworkBridge::NetworkBridge ( NetworkComponent networkComp  ) 

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


Member Function Documentation

void dtNetGM::NetworkBridge::SetMachineInfo ( const dtGame::MachineInfo machineInfo  ) 

Sets the MachineInfo.

Parameters:
The machineinfo

const dtGame::MachineInfo & dtNetGM::NetworkBridge::GetMachineInfo (  )  const

Gets the MachineInfo from the host.

Returns:
The name

const bool dtNetGM::NetworkBridge::IsNetworkConnected (  ) 

Returns if the networkbridge is connected.

Returns:
network connected

const bool dtNetGM::NetworkBridge::IsConnectedClient (  )  const

Returns if the networkbridge is connected as an accepted client to a server.

Returns:
is connected client

void dtNetGM::NetworkBridge::SetClientConnected ( bool  client = true  )  [inline]

Sets if the networkbridge is an accepted client.

Parameters:
The client state

void dtNetGM::NetworkBridge::SendDataStream ( dtUtil::DataStream dataStream  ) 

Sends a DataStream across the network.

Parameters:
The messagepacket

void dtNetGM::NetworkBridge::Disconnect ( int  waitTime = -1  ) 

Disconnects the current connection.

void dtNetGM::NetworkBridge::OnNewConnection ( GNE::SyncConnection &  conn  ) 

Callback function for GNE::ConnectionListener.

Parameters:
The GNE::SyncConnection

void dtNetGM::NetworkBridge::OnConnect ( GNE::SyncConnection &  conn  ) 

Callback function for GNE::ConnectionListener.

Parameters:
The GNE::SyncConnection

void dtNetGM::NetworkBridge::OnReceive ( GNE::Connection &  conn  ) 

Callback function for GNE::ConnectionListener.

Parameters:
The GNE::Connection

void dtNetGM::NetworkBridge::OnDisconnect ( GNE::Connection &  conn  ) 

Callback function for GNE::ConnectionListener.

Parameters:
The GNE::Connection

void dtNetGM::NetworkBridge::OnExit ( GNE::Connection &  conn  ) 

Callback function for GNE::ConnectionListener.

Parameters:
The GNE::Connection

void dtNetGM::NetworkBridge::OnFailure ( GNE::Connection &  conn,
const GNE::Error &  error 
)

Callback function for GNE::ConnectionListener.

Parameters:
conn The GNE::Connection
error The GNE::Error description

void dtNetGM::NetworkBridge::OnError ( GNE::Connection &  conn,
const GNE::Error &  error 
)

Callback function for GNE::ConnectionListener.

Parameters:
conn The GNE::Connection
error The GNE::Error description

void dtNetGM::NetworkBridge::OnConnectFailure ( GNE::Connection &  conn,
const GNE::Error &  error 
)

Callback function for GNE::ConnectionListener.

Parameters:
conn The GNE::Connection
error The GNE::Error description

void dtNetGM::NetworkBridge::OnTimeout ( GNE::Connection &  conn  ) 

Callback function for GNE::ConnectionListener.

Parameters:
The GNE::Connection

std::string dtNetGM::NetworkBridge::GetHostDescription (  ) 

Returns a string describing the host.

Returns:
string describing the host


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