Compile fixes
[ACE_TAO.git] / ACE / tests / Max_Default_Port_Test.h
blob10439aaeedc6f7a7cf5b03ad0b4bf51a92e8acd2
1 //=============================================================================
2 /**
3 * @file Max_Default_Port_Test.h
5 * This is a test to verify ACE_MAX_DEFAULT_PORT is correct.
7 * @author Chanaka Liyanaarachchi <chanaka@ociweb.com>
8 */
9 //=============================================================================
12 #ifndef ACE_TESTS_MAX_DEFAULT_PORT_TEST
13 #define ACE_TESTS_MAX_DEFAULT_PORT_TEST
15 #include "ace/Event_Handler.h"
16 #include "ace/SOCK_Acceptor.h"
17 #include "ace/SOCK_Stream.h"
18 #include "ace/INET_Addr.h"
20 /**
21 * @class My_Accept_Handler
22 = Title
23 * A simple event handler
25 class My_Accept_Handler : public ACE_Event_Handler
27 public:
28 My_Accept_Handler (ACE_INET_Addr &addr);
29 ~My_Accept_Handler ();
31 int open (ACE_INET_Addr &addr);
33 ACE_HANDLE get_handle () const;
35 int handle_input (ACE_HANDLE handle);
37 /// Returns the port the event handler is listening at.
38 u_short port ();
40 private:
41 ACE_SOCK_Acceptor peer_acceptor_;
43 ACE_SOCK_Stream stream_;
45 ACE_INET_Addr addr_;
48 #endif /* ACE_TESTS_MAX_DEFAULT_PORT_TEST */