39 virtual const string&
getIp()
const = 0;
45 virtual const uint16_t
getPort()
const = 0;
51 virtual const string&
getKey()
const = 0;
80 virtual void onRequest(
const UDPPacket* packet,
const uint32_t messageId,
const uint8_t retries) = 0;
Base class for network server clients.
virtual const string & getKey() const =0
Client identification key.
virtual void onPacketReceived(const UDPPacket *packet, const uint32_t messageId=0, const uint8_t retries=0)=0
Event, which will be called if packet has been received, defaults to worker thread pool.
virtual void shutdown()=0
Shuts down this network client.
UDPPacket * createPacket()
Creates a packet to be used with send.
virtual const uint16_t getPort() const =0
returns client port
virtual const string & getIp() const =0
returns client's ip
virtual void onRequest(const UDPPacket *packet, const uint32_t messageId, const uint8_t retries)=0
To be overwritten with a request handler, will be called from worker.
virtual const bool setKey(const string &key)=0
sets the clients identification key
static STATIC_DLL_IMPEXT const char * KEY_PREFIX_UNNAMED
virtual void close()=0
Shuts down this network client.
virtual void onCustom(const string &type)=0
Reference counter implementation to be used with inheritance.
std::exception Exception
Exception base class.
#define STATIC_DLL_IMPEXT