GComm  0.2.3
pc.hpp
1 /*
2  * Copyright (C) 2009-2014 Codership Oy <info@codership.com>
3  */
4 
5 #include "gcomm/transport.hpp"
6 
7 namespace gcomm
8 {
9  class GMCast;
10 
11  namespace evs
12  {
13  class Proto;
14  }
15 
16  namespace pc
17  {
18  class Proto;
19  }
20 
21  class PC : public Transport
22  {
23  public:
24 
25  PC (Protonet&, const gu::URI&);
26 
27  ~PC();
28 
29  void connect(bool start_prim = false);
30  void connect(const gu::URI&);
31  std::string listen_addr() const;
32 
33  void close(bool force = false);
34 
35  void handle_up(const void*, const Datagram&, const ProtoUpMeta&);
36  int handle_down(Datagram&, const ProtoDownMeta&);
37 
38  const UUID& uuid() const;
39 
40  size_t mtu() const;
41 
42  private:
43 
44  GMCast* gmcast_; // GMCast transport
45  evs::Proto* evs_; // EVS protocol layer
46  pc::Proto* pc_; // PC protocol layer
47  bool closed_; // flag for destructor
48  // Period to wait graceful leave
49  gu::datetime::Period linger_;
50  gu::datetime::Period announce_timeout_;
51 
52  PC(const PC&);
53  void operator=(const PC&);
54 
55  };
56 
57 } // namespace gcomm
Definition: protonet.hpp:37
Class implementing EVS protocol.
Definition: evs_proto.hpp:60
Transport interface.
Definition: transport.hpp:34
Definition: pc.hpp:21
Definition: pc_proto.hpp:33
Definition: gmcast.hpp:33
Definition: protolay.hpp:77
Transport interface.
Definition: uuid.hpp:26
Definition: protolay.hpp:168
Datagram container.
Definition: datagram.hpp:151