Fawkes API
Fawkes Development Version
|
Message handler for FawkesNetworkClient. More...
#include <>>
Public Member Functions | |
virtual | ~FawkesNetworkClientHandler () |
Empty virtual destructor. More... | |
virtual void | deregistered (unsigned int id)=0 throw () |
This handler has been deregistered. More... | |
virtual void | inbound_received (FawkesNetworkMessage *m, unsigned int id)=0 throw () |
Called for incoming messages. More... | |
virtual void | connection_died (unsigned int id)=0 throw () |
Client connection died. More... | |
virtual void | connection_established (unsigned int id)=0 throw () |
Client has established a connection. More... | |
Message handler for FawkesNetworkClient.
This interface is used by the FawkesNetworkClient to handle incoming messages.
Definition at line 31 of file client_handler.h.
|
virtual |
Empty virtual destructor.
Definition at line 69 of file client_handler.cpp.
|
pure virtual |
Client connection died.
This method is used to inform handlers that the connection has died for any reason. No more data can be send and no more messages should be enqueued because it is unclear when they would be sent.
id | the id of the calling client |
Implemented in SkillShellThread, SkillShellThread, fawkes::NetworkConfiguration, fawkes::RemoteBlackBoard, ExamplePluginClientNetworkReceiver, and fawkes::ConnectionDispatcher.
|
pure virtual |
Client has established a connection.
Whenever the client establishes a connection this is signaled to handlers with this method. You can register to a client at any time, you may even enqueue messages to a client while the connection is dead. If the client at some point gets connected again, the messages will then be send out in one go. You should use this in your application though to only send data if the connection is alive and you should let the user know about the connection status.
id | the id of the calling client |
Implemented in SkillShellThread, SkillShellThread, fawkes::NetworkConfiguration, fawkes::RemoteBlackBoard, ExamplePluginClientNetworkReceiver, and fawkes::ConnectionDispatcher.
|
pure virtual |
This handler has been deregistered.
This is called when this handler is deregistered from the FawkesNetworkClient. Sometimes you may not want to allow this and post a big fat warning into the log.
id | the id of the calling client |
Implemented in SkillShellThread, SkillShellThread, fawkes::NetworkConfiguration, fawkes::RemoteBlackBoard, fawkes::ConnectionDispatcher, and ExamplePluginClientNetworkReceiver.
|
pure virtual |
Called for incoming messages.
This is called when an incoming message has been received. If this method was called one or more times then the a previously carried out wait(cid) call will continue.
m | Message to handle |
id | the id of the calling client |
Implemented in SkillShellThread, SkillShellThread, fawkes::NetworkConfiguration, fawkes::RemoteBlackBoard, ExamplePluginClientNetworkReceiver, and fawkes::ConnectionDispatcher.