Use =default for skeleton copy constructor
[ACE_TAO.git] / ACE / examples / C++NPv2 / Reactor_Logging_Server_T.cpp
blob962affe35cd1709604c24841e63e6b67c22009fb
1 /*
2 ** Copyright 2002 Addison Wesley. All Rights Reserved.
3 */
5 // Implementations for Reactor_Logging_Server<>
7 template <class ACCEPTOR>
8 Reactor_Logging_Server<ACCEPTOR>::Reactor_Logging_Server
9 (int argc, char *argv[], ACE_Reactor *reactor)
10 : ACCEPTOR (reactor) {
11 u_short logger_port = argc > 0 ? ACE_OS::atoi (argv[0]) : 0;
12 typename ACCEPTOR::PEER_ADDR server_addr;
13 int result;
15 if (logger_port != 0)
16 result = server_addr.set (logger_port,
17 (ACE_UINT32) INADDR_ANY);
18 else
19 result = server_addr.set ("ace_logger",
20 (ACE_UINT32) INADDR_ANY);
21 if (result != -1)
22 result = ACCEPTOR::open (server_addr);
23 if (result == -1) reactor->end_reactor_event_loop ();