DiscoveryAwaiter.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include <swarmio/data/discovery/Response.pb.h>
5 
7 {
12  class SWARMIO_API DiscoveryAwaiter final : public Awaiter<data::discovery::Response>
13  {
14  protected:
15 
22  virtual data::discovery::Response ExtractResponse(const Node* node, const data::Message* message) override
23  {
24  return message->ds_response();
25  }
26 
27  public:
28 
35  DiscoveryAwaiter(Endpoint* endpoint, uint64_t requestIdentifier)
36  : Awaiter(endpoint, requestIdentifier)
37  {
38  FinishConstruction();
39  }
40 
46  DiscoveryAwaiter(const data::discovery::Response& value)
47  : Awaiter(value)
48  {
49  FinishConstruction();
50  }
51  };
52 }
A special mailbox that handles responses to a message.
Definition: Awaiter.h:19
DiscoveryAwaiter(const data::discovery::Response &value)
Construct a DiscoveryAwaiter with a cached value.
virtual data::discovery::Response ExtractResponse(const Node *node, const data::Message *message) override
Called when a response for the original message has been received.
An Awaiter that returns discovery data on a remote node.
Abstract base class for Endpoint implementations.
Definition: Endpoint.h:25
DiscoveryAwaiter(Endpoint *endpoint, uint64_t requestIdentifier)
Construct a new DiscoveryAwaiter object.
Represents a Node the Endpoint knows about and can send messages to.


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