Fawkes API
Fawkes Development Version
|
Example Plugin network ping tool Small class that waits for a reply of the example plugin after a short network message was sent. More...
Public Member Functions | |
ExamplePluginClientNetworkReceiver () | |
Constructor. More... | |
virtual void | deregistered (unsigned int id) throw () |
The handler got deregistered. More... | |
virtual void | inbound_received (FawkesNetworkMessage *m, unsigned int id) throw () |
Inbound mesage received. More... | |
virtual void | connection_died (unsigned int id) throw () |
Client connection died. More... | |
virtual void | connection_established (unsigned int id) throw () |
Client has established a connection. More... | |
![]() | |
virtual | ~FawkesNetworkClientHandler () |
Empty virtual destructor. More... | |
Public Attributes | |
bool | quit |
Set to true if answer has been received or handler was deregistered. More... | |
Example Plugin network ping tool Small class that waits for a reply of the example plugin after a short network message was sent.
Definition at line 37 of file example_plugin_netping.cpp.
|
inline |
Constructor.
Definition at line 41 of file example_plugin_netping.cpp.
|
inlinevirtual |
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 |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 71 of file example_plugin_netping.cpp.
|
inlinevirtual |
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 |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 78 of file example_plugin_netping.cpp.
|
inlinevirtual |
The handler got deregistered.
id | the id of the calling client |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 49 of file example_plugin_netping.cpp.
|
inlinevirtual |
Inbound mesage received.
m | message |
id | the id of the calling thread |
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 59 of file example_plugin_netping.cpp.
bool ExamplePluginClientNetworkReceiver::quit |
Set to true if answer has been received or handler was deregistered.
False at object creation.
Definition at line 87 of file example_plugin_netping.cpp.