ExamplePluginClientNetworkReceiver Class Reference
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. | |
| virtual void | deregistered (unsigned int id) throw () |
| The handler got deregistered. | |
| virtual void | inbound_received (FawkesNetworkMessage *m, unsigned int id) throw () |
| Inbound mesage received. | |
| virtual void | connection_died (unsigned int id) throw () |
| Client connection died. | |
| virtual void | connection_established (unsigned int id) throw () |
| Client has established a connection. | |
Public Attributes | |
| bool | quit |
| Set to true if answer has been received or handler was deregistered. | |
Detailed Description
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.
Constructor & Destructor Documentation
| ExamplePluginClientNetworkReceiver::ExamplePluginClientNetworkReceiver | ( | ) | [inline] |
Member Function Documentation
| virtual void ExamplePluginClientNetworkReceiver::connection_died | ( | unsigned int | id | ) | throw () [inline, 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.
- Parameters:
-
id the id of the calling client
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 71 of file example_plugin_netping.cpp.
References quit.
| virtual void ExamplePluginClientNetworkReceiver::connection_established | ( | unsigned int | id | ) | throw () [inline, 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.
- Parameters:
-
id the id of the calling client
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 78 of file example_plugin_netping.cpp.
| virtual void ExamplePluginClientNetworkReceiver::deregistered | ( | unsigned int | id | ) | throw () [inline, virtual] |
The handler got deregistered.
- Parameters:
-
id the id of the calling client
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 49 of file example_plugin_netping.cpp.
References quit.
| virtual void ExamplePluginClientNetworkReceiver::inbound_received | ( | FawkesNetworkMessage * | m, | |
| unsigned int | id | |||
| ) | throw () [inline, virtual] |
Inbound mesage received.
- Parameters:
-
m message id the id of the calling thread
Implements fawkes::FawkesNetworkClientHandler.
Definition at line 59 of file example_plugin_netping.cpp.
References quit.
Member Data Documentation
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.
Referenced by connection_died(), deregistered(), ExamplePluginClientNetworkReceiver(), and inbound_received().
The documentation for this class was generated from the following file:
- src/plugins/examples/basics/example_plugin_netping.cpp

