gramods
RunSync.hh
1 
2 #ifndef GRAMODS_NETWORK_RUNSYNC
3 #define GRAMODS_NETWORK_RUNSYNC
4 
5 #include <gmNetwork/Protocol.hh>
6 
7 #include <set>
8 #include <mutex>
9 #include <condition_variable>
10 
11 BEGIN_NAMESPACE_GMNETWORK;
12 
16 class RunSync
17  : public Protocol {
18 
19 public:
20 
21  RunSync();
22  ~RunSync();
23 
29  void wait();
30 
35  void processMessage(Message m) override;
36 
41  void lostPeer(size_t idx) override;
42 
48  char getProtocolFlag() override { return 10; }
49 
50 private:
51 
52  struct Impl;
53  std::unique_ptr<Impl> _impl;
54 };
55 
56 END_NAMESPACE_GMNETWORK;
57 
58 #endif
TODO: write this.
Definition: Protocol.hh:21
Execution synchronization over network, i.e.
Definition: RunSync.hh:17
char getProtocolFlag() override
Returns the header byte associated with the protocol, sent in the header of messages to indicate whic...
Definition: RunSync.hh:48
Data entity communicated by the connection to the designated protocol.
Definition: Protocol.hh:43