Ping Service dispatches and responds to ping requests, and measures the time between the request and the response. More...
#include <Service.h>

Public Member Functions | |
| virtual void | DescribeService (data::discovery::Response &descriptor) override |
| Add descriptors for the service to the discovery descriptor. More... | |
| virtual bool | ReceiveMessage (const Node *sender, const data::Message *message) override |
| Delivery point of all messages. More... | |
| Service (Endpoint *endpoint) | |
| Construct a new Service object. More... | |
Public Member Functions inherited from swarmio::Mailbox | |
| virtual void | Disconnect () |
| Disconnect this Mailbox from the Endpoint. More... | |
| Endpoint * | GetEndpoint () |
| Get the associated Endpoint. More... | |
| Mailbox (const Mailbox &)=delete | |
| Remove copy constructor. More... | |
| virtual void | MailboxWasConnected () noexcept |
| Called when the mailbox is attached to an already running endpoint or if the attached endpoint has just started. More... | |
| virtual void | MailboxWillBeDisconnected () noexcept |
| Called right before the mailbox is disconnected from its endpoint or if the attached endpoint is about to stop. More... | |
| virtual void | NodeDidJoin (const Node *node) noexcept |
| Called when a new Node has joined the group. More... | |
| virtual void | NodeWasDiscovered (const Node *node) noexcept |
| Called when a new Node has been discovered. More... | |
| virtual void | NodeWillLeave (const Node *node) noexcept |
| Called when a Node signals that it will leave. More... | |
| Mailbox & | operator= (const Mailbox &)=delete |
| Remove assignment operator. More... | |
| virtual | ~Mailbox () |
| Destroy the Mailbox object. More... | |
Static Public Member Functions | |
| static TimingAwaiter | Ping (Endpoint *endpoint, const Node *node, size_t size) |
| Measure the latency to a remote node. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from swarmio::Mailbox | |
| void | FinishConstruction () |
| Called when the last constructor has finished its job. More... | |
| void | FinishMovingTo (Mailbox *other) |
| Called when message handling should be passed onto the new instance. More... | |
| Mailbox () | |
| Construct a disconnected Mailbox. More... | |
| Mailbox (Endpoint *endpoint) | |
| Construct a new Mailbox object. More... | |
| Mailbox (Mailbox &&other) | |
| Move a Mailbox object. More... | |
Ping Service dispatches and responds to ping requests, and measures the time between the request and the response.
Definition at line 15 of file ping/Service.h.
|
inline |
Construct a new Service object.
| endpoint | Endpoint |
Definition at line 34 of file ping/Service.h.
|
overridevirtual |
Add descriptors for the service to the discovery descriptor.
| descriptor | The proposed response to load the description into |
Implements swarmio::services::discovery::Discoverable.
Definition at line 56 of file ping/Service.cpp.
|
static |
Measure the latency to a remote node.
Definition at line 10 of file ping/Service.cpp.
|
overridevirtual |
Delivery point of all messages.
| sender | The node that has sent the message |
| message | The message itself |
Reimplemented from swarmio::Mailbox.
Definition at line 26 of file ping/Service.cpp.