diff options
author | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
---|---|---|
committer | William R. Otte <wotte@dre.vanderbilt.edu> | 2006-07-24 15:50:30 +0000 |
commit | c44379cc7d9c7aa113989237ab0f56db12aa5219 (patch) | |
tree | 66a84b20d47f2269d8bdc6e0323f338763424d3a /ACE/tests/MEM_Stream_Test.h | |
parent | 3aff90f4a822fcf5d902bbfbcc9fa931d6191a8c (diff) | |
download | ATCD-c44379cc7d9c7aa113989237ab0f56db12aa5219.tar.gz |
Repo restructuring
Diffstat (limited to 'ACE/tests/MEM_Stream_Test.h')
-rw-r--r-- | ACE/tests/MEM_Stream_Test.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/ACE/tests/MEM_Stream_Test.h b/ACE/tests/MEM_Stream_Test.h new file mode 100644 index 00000000000..b9ed6924463 --- /dev/null +++ b/ACE/tests/MEM_Stream_Test.h @@ -0,0 +1,57 @@ +/* -*- C++ -*- */ +// $Id$ + +// ============================================================================ +// +// = LIBRARY +// tests +// +// = FILENAME +// MEM_Stream_Test.h +// +// = DESCRIPTION +// This file has the class definitions needed for template generation in +// MEM_Stream_Test.cpp. They have to be in a separate file so AIX xlC can +// find them at auto-instantiate time. +// +// = AUTHOR +// Steve Huston <shuston@riverace.com> +// +// ============================================================================ + +#ifndef ACE_TESTS_MEM_STREAM_TEST_H +#define ACE_TESTS_MEM_STREAM_TEST_H + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "ace/MEM_Stream.h" +#include "ace/Reactor.h" +#include "ace/Svc_Handler.h" +#include "ace/Synch_Traits.h" + +#if (ACE_HAS_POSITION_INDEPENDENT_POINTERS == 1) + +class Echo_Handler : public ACE_Svc_Handler<ACE_MEM_STREAM, ACE_SYNCH> +{ + // = TITLE + // Simple class for reading in the data and then sending it back +public: + Echo_Handler (ACE_Thread_Manager *thr_mgr = 0); + virtual int open (void *); + static void reset_handler (void); + virtual int handle_input (ACE_HANDLE h); + virtual int handle_close (ACE_HANDLE handle, + ACE_Reactor_Mask close_mask); + // The Svc_Handler callbacks. + virtual int svc (void); + +private: + ACE_TCHAR name_[MAXPATHLEN]; + u_short connection_; +}; + +#endif /* ACE_HAS_POSITION_INDEPENDENT_POINTERS */ + +#endif /* ACE_TESTS_MEM_STREAM_TEST_H */ |