Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Attributes | List of all members
orxonox::MasterServerComm Class Reference

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/libraries/network/MasterServerComm.h>

Public Member Functions

 MasterServerComm ()
 constructor More...
 
 ~MasterServerComm ()
 destructor More...
 
int connect (const char *address, unsigned int port)
 
int disconnect (void)
 
int initialize ()
 
int pollForReply (WANDiscovery *listener, int delayms)
 
int sendRequest (const char *data)
 
int sendRequest (std::string data)
 
void update ()
 

Private Attributes

ENetAddress address
 address holder More...
 
ENetHostclient
 client handle More...
 
ENetEvent event
 event data holder More...
 
ENetPeerpeer
 peer data holder More...
 

Constructor & Destructor Documentation

orxonox::MasterServerComm::MasterServerComm ( )

constructor

orxonox::MasterServerComm::~MasterServerComm ( )

destructor

Member Function Documentation

int orxonox::MasterServerComm::connect ( const char *  address,
unsigned int  port 
)
Parameters
addressAddress to connect to (Host name or IP in text form)
portPort to connect on
Returns
0 for success, other for error

Connect to the master server with the given address on the given port.

int orxonox::MasterServerComm::disconnect ( void  )
Returns
0 for success, other for error

Disconnect from master server.

int orxonox::MasterServerComm::initialize ( )
Returns
0 for success, other for error

Initialize everything for the master server communication

int orxonox::MasterServerComm::pollForReply ( WANDiscovery listener,
int  delayms 
)
Parameters
listenerThe listener to call with data received.
delaymsDelay in milliseconds.
Returns
0 for success, other for error

Poll the master server for new data and act accordingly

int orxonox::MasterServerComm::sendRequest ( const char *  data)
Parameters
dataThe data to be sent.
Returns
0 for success, other for error.

Send a request to the master server containing data specified in data

int orxonox::MasterServerComm::sendRequest ( std::string  data)
Parameters
dataThe data to be sent.
Returns
0 for success, other for error.

Send a request to the master server containing data specified in data (string version)

void orxonox::MasterServerComm::update ( )

Member Data Documentation

ENetAddress orxonox::MasterServerComm::address
private

address holder

ENetHost* orxonox::MasterServerComm::client
private

client handle

ENetEvent orxonox::MasterServerComm::event
private

event data holder

ENetPeer* orxonox::MasterServerComm::peer
private

peer data holder


The documentation for this class was generated from the following files: