36 virtual uint16_t
getID()
const = 0;
39 virtual void kick(
const char* reason) = 0;
60 virtual int getPing()
const = 0;
virtual const NetAddress & getRemoteAddress() const =0
Returns the address the Client associated with this Player is connecting from.
Abstract base class for Message.
Definition: nrg_message.h:36
Contains Message classes and functionality for two-way RPC between Server and Client.
Represents a connected client on the server.
Definition: nrg_player.h:34
virtual int getPing() const =0
Returns the round-trip latency of this player.
The main server-side class of the library.
Definition: nrg_server.h:44
virtual void kick(const char *reason)=0
Kick the player from the server, sending them a reason why.
virtual uint16_t getID() const =0
Returns the library-assigned player's ID.
virtual ~Player()
Default destructor.
Definition: nrg_player.h:63
virtual const Server * getServer() const =0
Returns the server associated with this Player.
virtual bool isConnected() const =0
Returns true if this player is connected to a Server.
virtual void registerMessageHandler(MessageBase &&)=0
Register a Message containing a callback with this Player (R-Value reference version) ...
virtual void sendMessage(const MessageBase &m)=0
Send the player a Message with the contents specified in m.
Common defines and includes used by all the other nrg header files.
Class to wrap the various POSIX sockaddrs and resolve hostnames.
Definition: nrg_netaddress.h:32