diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-11 04:38:13 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-11-11 04:38:13 +0000 |
commit | 42061184d656599c7bdab98ebb5d32ffae9af271 (patch) | |
tree | 52d4a0d050a19f15f57024bec5530900b0bcd2d9 /docs/tutorials/015/server.cpp | |
parent | 4905ad6931b37394711495dda1fd76fece62e44f (diff) | |
download | ATCD-TAO-0_2_40.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-0_2_40'.TAO-0_2_40
Diffstat (limited to 'docs/tutorials/015/server.cpp')
-rw-r--r-- | docs/tutorials/015/server.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/docs/tutorials/015/server.cpp b/docs/tutorials/015/server.cpp deleted file mode 100644 index bface44e341..00000000000 --- a/docs/tutorials/015/server.cpp +++ /dev/null @@ -1,46 +0,0 @@ - -// $Id$ - -#include "Server_i.h" - -// A signal handler that will close the server object -extern "C" void handler (int) -{ - Server::close(); -} - -int main (int, char **) -{ - // The server object that abstracts away all of difficult parts. - Server server; - - // Attempt to open the server. Like all good ACE-based - // objects, we'll get -1 on failure. - if( server.open() == -1 ) - { - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "server.open()"), -1); - } - - // Install a signal handler for ^C so that we can exit gracefully - ACE_Sig_Action sa ((ACE_SignalHandler) handler, SIGINT); - - // Run the server's main loop until we're interrupted - if( server.run() == -1 ) - { - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "server.run()"), -1); - } - - return 0; -} - -/* These explicit instantiations were taken from an earlier tutorial. - Your compiler may require others as well. -*/ -#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Acceptor <Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; -#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Acceptor <Handler, ACE_SOCK_ACCEPTOR> -#pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> -#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ - |