i6engine  1.0
i6e::api::NetworkFacade Class Reference

#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/api/facades/NetworkFacade.h>

Public Member Functions

 NetworkFacade ()
 
 ~NetworkFacade ()
 
core::IPKey getIP () const
 returns the IP More...
 
std::string getSimpleIP () const
 returns the IP without Port as a string More...
 
bool connect (const core::IPKey remoteIP, const uint16_t localPort)
 connects with given local port to the remote IP and the remote port More...
 
bool listen (const uint16_t localPort)
 
void disconnect ()
 disconnects from a multiplayergame More...
 
void enablePing (bool enabled)
 Enables the ping-time measure. More...
 
void subscribe (uint16_t channel)
 subscribes on given channel More...
 
void unsubscribe (uint16_t channel)
 unsubscribes from given channel More...
 
void publish (uint16_t channel, const GameMessage::Ptr &msg)
 publishes on given channel More...
 
void registerSubscribeCallback (const boost::function< void(uint16_t)> &f)
 registers a callback for subscribe, call only by networking subsystem More...
 
void registerUnsubscribeCallback (const boost::function< void(uint16_t)> &f)
 registers a callback for unsubscribe, call only by networking subsystem More...
 
void registerPublishCallback (const boost::function< void(uint16_t, const GameMessage::Ptr &)> &f)
 registers a callback for publish, call only by networking subsystem More...
 
void registerConnectCallback (const boost::function< bool(const core::IPKey &, const core::IPKey &)> &f)
 registers a callback for connect, call only by networking subsystem More...
 
void registerDisconnectCallback (const boost::function< void(void)> &f)
 registers a callback for disconnect, call only by networking subsystem More...
 
void resetSubSystem ()
 resets the subsystem to it's defaults More...
 

Detailed Description

Definition at line 37 of file NetworkFacade.h.

Constructor & Destructor Documentation

i6e::api::NetworkFacade::NetworkFacade ( )
i6e::api::NetworkFacade::~NetworkFacade ( )

Member Function Documentation

bool i6e::api::NetworkFacade::connect ( const core::IPKey  remoteIP,
const uint16_t  localPort 
)

connects with given local port to the remote IP and the remote port

void i6e::api::NetworkFacade::disconnect ( )

disconnects from a multiplayergame

void i6e::api::NetworkFacade::enablePing ( bool  enabled)

Enables the ping-time measure.

core::IPKey i6e::api::NetworkFacade::getIP ( ) const
inline

returns the IP

Definition at line 45 of file NetworkFacade.h.

std::string i6e::api::NetworkFacade::getSimpleIP ( ) const
inline

returns the IP without Port as a string

Definition at line 50 of file NetworkFacade.h.

bool i6e::api::NetworkFacade::listen ( const uint16_t  localPort)
void i6e::api::NetworkFacade::publish ( uint16_t  channel,
const GameMessage::Ptr msg 
)

publishes on given channel

void i6e::api::NetworkFacade::registerConnectCallback ( const boost::function< bool(const core::IPKey &, const core::IPKey &)> &  f)

registers a callback for connect, call only by networking subsystem

void i6e::api::NetworkFacade::registerDisconnectCallback ( const boost::function< void(void)> &  f)

registers a callback for disconnect, call only by networking subsystem

void i6e::api::NetworkFacade::registerPublishCallback ( const boost::function< void(uint16_t, const GameMessage::Ptr &)> &  f)

registers a callback for publish, call only by networking subsystem

void i6e::api::NetworkFacade::registerSubscribeCallback ( const boost::function< void(uint16_t)> &  f)

registers a callback for subscribe, call only by networking subsystem

void i6e::api::NetworkFacade::registerUnsubscribeCallback ( const boost::function< void(uint16_t)> &  f)

registers a callback for unsubscribe, call only by networking subsystem

void i6e::api::NetworkFacade::resetSubSystem ( )

resets the subsystem to it's defaults

void i6e::api::NetworkFacade::subscribe ( uint16_t  channel)

subscribes on given channel

void i6e::api::NetworkFacade::unsubscribe ( uint16_t  channel)

unsubscribes from given channel


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