|
Planeshift
|
#include <clientmsghandler.h>
Public Member Functions | |
| ClientMsgHandler () | |
| bool | Connect (const char *server, int port) |
| This is a conveniance function that basically calls NetBase::Connect. | |
| DeclareGenericEventHandler (EventHandler, ClientMsgHandler,"planeshift.clientmsghandler") | |
| Declare our event handler. | |
| bool | DispatchQueue () |
| This function Publish all messages currently in the inbound message queue. | |
| int | GetNextSequenceNumber (msgtype mtype) |
| Get the next sequence number to use for an ordered message. | |
| bool | HandleEvent (iEvent &Event) |
| This function implementes the iEventHandler interface and is called whenever a subscribed event occurs. | |
| bool | Initialize (NetBase *nb, iObjectRegistry *object_reg) |
| Initializes the Handler. | |
| void | SendMessage (MsgEntry *msg) |
| Send outgoing messages, setting the clientnum automatically beforehand. | |
| virtual | ~ClientMsgHandler () |
Public Attributes | |
| csRef< EventHandler > | scfiEventHandler |
Protected Attributes | |
| iObjectRegistry * | object_reg |
| csHash< OrderedMessageChannel * > | orderedMessages |
Definition at line 35 of file clientmsghandler.h.
| ClientMsgHandler::ClientMsgHandler | ( | ) |
| virtual ClientMsgHandler::~ClientMsgHandler | ( | ) | [virtual] |
| bool ClientMsgHandler::Connect | ( | const char * | server, |
| int | port | ||
| ) |
This is a conveniance function that basically calls NetBase::Connect.
| ClientMsgHandler::DeclareGenericEventHandler | ( | EventHandler | , |
| ClientMsgHandler | , | ||
| "planeshift.clientmsghandler" | |||
| ) |
Declare our event handler.
| bool ClientMsgHandler::DispatchQueue | ( | ) |
This function Publish all messages currently in the inbound message queue.
Get the next sequence number to use for an ordered message.
| bool ClientMsgHandler::HandleEvent | ( | iEvent & | Event | ) |
This function implementes the iEventHandler interface and is called whenever a subscribed event occurs.
We use this to trap idle events and process the incoming queue during those times instead of running a separate thread.
| bool ClientMsgHandler::Initialize | ( | NetBase * | nb, |
| iObjectRegistry * | object_reg | ||
| ) |
Initializes the Handler.
| void ClientMsgHandler::SendMessage | ( | MsgEntry * | msg | ) | [inline, virtual] |
Send outgoing messages, setting the clientnum automatically beforehand.
Reimplemented from MsgHandler.
Definition at line 53 of file clientmsghandler.h.
iObjectRegistry* ClientMsgHandler::object_reg [protected] |
Definition at line 77 of file clientmsghandler.h.
csHash<OrderedMessageChannel*> ClientMsgHandler::orderedMessages [protected] |
Definition at line 78 of file clientmsghandler.h.
| csRef<EventHandler> ClientMsgHandler::scfiEventHandler |
Definition at line 74 of file clientmsghandler.h.
1.7.3