Merge pull request #2318 from jwillemsen/jwi-add_forward_profiles
[ACE_TAO.git] / ACE / examples / Service_Configurator / IPC-tests / server / Handle_Broadcast.h
blob52c04194130dfc35166f0a0e0c809028c8b5f525
1 // -*- C++ -*-
2 /* Handles INET broadcast datagram messages from remote hosts on the local subnet. */
4 #ifndef _HANDLE_BROADCAST_H
5 #define _HANDLE_BROADCAST_H
7 #include "ace/Service_Config.h"
8 #include "ace/Reactor.h"
10 #if !defined (ACE_LACKS_PRAGMA_ONCE)
11 # pragma once
12 #endif /* ACE_LACKS_PRAGMA_ONCE */
14 #include "ace/Service_Types.h"
15 #include "ace/INET_Addr.h"
16 #include "ace/SOCK_Dgram.h"
17 #include "ace/Log_Msg.h"
18 #include "ace/svc_export.h"
20 class ACE_Svc_Export Handle_Broadcast : public ACE_Service_Object, public ACE_SOCK_Dgram
22 public:
23 Handle_Broadcast ();
24 ~Handle_Broadcast ();
25 virtual int init (int argc, ACE_TCHAR *argv[]);
26 virtual int info (ACE_TCHAR **, size_t) const;
27 virtual int fini ();
29 private:
30 int open (const ACE_INET_Addr &r, int async = 0);
31 virtual ACE_HANDLE get_handle () const;
32 virtual int handle_input (ACE_HANDLE fd);
33 virtual int handle_close (ACE_HANDLE fd, ACE_Reactor_Mask);
35 static unsigned short DEFAULT_PORT;
38 extern ACE_Service_Object_Type rb;
40 #if defined (__ACE_INLINE__)
41 #define ACE_INLINE inline
42 #include "Handle_Broadcast.inl"
43 #else
44 #define ACE_INLINE
45 #endif /* __ACE_INLINE__ */
47 #endif /* _HANDLE_BROADCAST_H */