diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-04-10 19:59:37 +0000 |
commit | 3df4acfa816441fc28a95dee6d0191a927145d95 (patch) | |
tree | b5ae7ca44662cfd8e5c95f1826e4406021a606f5 /examples/C++NPv2/Logging_Event_Handler.cpp | |
parent | 60a5612b83d856fc0adc52b9f39fac9960ec9818 (diff) | |
download | ATCD-pre-subset.tar.gz |
This commit was manufactured by cvs2svn to create tag 'pre-subset'.pre-subset
Diffstat (limited to 'examples/C++NPv2/Logging_Event_Handler.cpp')
-rw-r--r-- | examples/C++NPv2/Logging_Event_Handler.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/examples/C++NPv2/Logging_Event_Handler.cpp b/examples/C++NPv2/Logging_Event_Handler.cpp deleted file mode 100644 index e6de908074d..00000000000 --- a/examples/C++NPv2/Logging_Event_Handler.cpp +++ /dev/null @@ -1,43 +0,0 @@ -/* -** $Id$ -** -** Copyright 2002 Addison Wesley. All Rights Reserved. -*/ - -#include "ace/FILE_Connector.h" - -#include "Logging_Event_Handler.h" - -int Logging_Event_Handler::open () { - - static const char LOGFILE_SUFFIX[] = ".log"; - char filename[MAXHOSTNAMELEN + sizeof (LOGFILE_SUFFIX)]; - ACE_INET_Addr logging_peer_addr; - - logging_handler_.peer ().get_remote_addr (logging_peer_addr); - logging_peer_addr.get_host_name (filename, MAXHOSTNAMELEN); - strcat (filename, LOGFILE_SUFFIX); - - ACE_FILE_Connector connector; - connector.connect (log_file_, - ACE_FILE_Addr (filename), - 0, // No timeout. - ACE_Addr::sap_any, // Ignored. - 0, // Don't try to reuse the addr. - O_RDWR|O_CREAT|O_APPEND, - ACE_DEFAULT_FILE_PERMS); - - return reactor ()->register_handler - (this, ACE_Event_Handler::READ_MASK); -} - -int Logging_Event_Handler::handle_input (ACE_HANDLE) -{ return logging_handler_.log_record (); } - -int Logging_Event_Handler::handle_close (ACE_HANDLE, - ACE_Reactor_Mask) { - logging_handler_.close (); - log_file_.close (); - delete this; - return 0; -} |