19 #ifndef __CLNTMSGHANDLER_H__ 20 #define __CLNTMSGHANDLER_H__ 22 #include <csutil/scf.h> 29 struct iObjectRegistry;
50 bool Connect(
const char* server,
int port);
iObjectRegistry * object_reg
The structure of 1 queue entry (pointer to a message)
bool HandleEvent(iEvent &Event)
This function implementes the iEventHandler interface and is called whenever a subscribed event occur...
Handles messages to be sent out, connects to server and send those.
virtual bool SendMessage(MsgEntry *me)
Put a message into the outgoing queue.
bool Initialize(NetBase *nb, iObjectRegistry *object_reg)
Initializes the Handler.
void SendMessage(MsgEntry *msg)
Send outgoing messages, setting the clientnum automatically beforehand.
virtual ~ClientMsgHandler()
bool Connect(const char *server, int port)
This is a conveniance function that basically calls NetBase::Connect.
This class acts as a base for client/server net classes.
This class is the client's and server's main interface for either sending network messages out or get...
int GetNextSequenceNumber(msgtype mtype)
Get the next sequence number to use for an ordered message.
bool DispatchQueue()
This function Publish all messages currently in the inbound message queue.
DeclareGenericEventHandler(EventHandler, ClientMsgHandler,"planeshift.clientmsghandler")
Declare our event handler.
csRef< EventHandler > scfiEventHandler
csHash< OrderedMessageChannel * > orderedMessages