Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / protocols / ace / RMCast / Link.h
blob00c77ee3442c65d6f31ce5cab63a983d6a4e01f8
1 // author : Boris Kolpackov <boris@kolpackov.net>
3 #ifndef ACE_RMCAST_LINK_H
4 #define ACE_RMCAST_LINK_H
6 #include "ace/SOCK_Dgram.h"
7 #include "ace/SOCK_Dgram_Mcast.h"
9 #include "ace/Thread_Manager.h"
11 #include "Stack.h"
12 #include "Protocol.h"
13 #include "Parameters.h"
15 namespace ACE_RMCast
17 class Link : public Element
19 public:
20 ~Link ();
22 Link (Address const& addr, Parameters const& params);
24 virtual void
25 in_start (In_Element* in);
27 virtual void
28 out_start (Out_Element* out);
30 virtual void
31 in_stop ();
33 public:
34 virtual void
35 send (Message_ptr m);
37 private:
38 virtual void
39 send_ (Message_ptr m);
41 private:
42 void
43 recv ();
45 static ACE_THR_FUNC_RETURN
46 recv_thunk (void* obj);
48 private:
49 virtual void
50 recv (Message_ptr);
52 private:
53 Parameters const& params_;
55 Address addr_, self_;
56 ACE_SOCK_Dgram_Mcast rsock_;
57 ACE_SOCK_Dgram ssock_;
59 bool stop_;
60 ACE_Thread_Manager recv_mgr_;
62 // Simulator.
64 Message_ptr hold_;
66 Mutex mutex_;
71 #endif // ACE_RMCAST_LINK_H