25 #ifndef __I6ENGINE_API_NETWORKFACADE_H__
26 #define __I6ENGINE_API_NETWORKFACADE_H__
32 #include "boost/function.hpp"
55 bool connect(
const core::IPKey remoteIP,
const uint16_t localPort);
57 bool listen(
const uint16_t localPort);
67 void enablePing(
bool enabled);
72 void subscribe(uint16_t channel);
77 void unsubscribe(uint16_t channel);
87 void registerSubscribeCallback(
const boost::function<
void(uint16_t)> & f);
92 void registerUnsubscribeCallback(
const boost::function<
void(uint16_t)> & f);
97 void registerPublishCallback(
const boost::function<
void(uint16_t,
const GameMessage::Ptr &)> & f);
107 void registerDisconnectCallback(
const boost::function<
void(
void)> & f);
112 void resetSubSystem();
128 bool _unsubscribeInit;
138 boost::function<void(uint16_t)> _subscribe;
143 boost::function<void(uint16_t)> _unsubscribe;
148 boost::function<void(uint16_t, const GameMessage::Ptr &)> _publish;
158 bool _disconnectInit;
163 boost::function<bool(const core::IPKey &, const core::IPKey &)> _connect;
168 boost::function<void(void)> _disconnect;
#define ISIXE_MODULES_API
boost::shared_ptr< Message > Ptr
std::string getSimpleIP() const
returns the IP without Port as a string
core::IPKey getIP() const
returns the IP