ping/Service.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <swarmio/Mailbox.h>
6 
8 {
15  class SWARMIO_API Service final : public Mailbox, public discovery::Discoverable
16  {
17  public:
18 
27  static TimingAwaiter Ping(Endpoint* endpoint, const Node* node, size_t size);
28 
34  Service(Endpoint* endpoint)
35  : Mailbox(endpoint)
36  {
37  FinishConstruction();
38  }
39 
48  virtual bool ReceiveMessage(const Node* sender, const data::Message* message) override;
49 
57  virtual void DescribeService(data::discovery::Response& descriptor) override;
58  };
59 }
An Awaiter that returns the roundtrip time of the Echo message.
Definition: TimingAwaiter.h:12
Abstract base class for Endpoint implementations.
Definition: Endpoint.h:25
Ping Service dispatches and responds to ping requests, and measures the time between the request and ...
Definition: ping/Service.h:15
Interface for discoverable services.
Definition: Discoverable.h:12
Service(Endpoint *endpoint)
Construct a new Service object.
Definition: ping/Service.h:34
Represents a Node the Endpoint knows about and can send messages to.
Abstract base class for Mailbox implementations.
Definition: Mailbox.h:13


swarmros
Author(s):
autogenerated on Fri Apr 3 2020 03:42:48