2 #ifndef JAWS_ASYNCH_IO_HELPERS_H
3 #define JAWS_ASYNCH_IO_HELPERS_H
5 #include "ace/Asynch_IO.h"
6 #include "ace/Singleton.h"
8 #include "jaws3/Jaws_IO.h"
9 #include "jaws3/Event_Result.h"
10 #include "jaws3/Event_Completer.h"
14 class JAWS_EC_AH_Adapter
: public ACE_Handler
16 // A JAWS_Event_Completer - ACE_Handler adapter.
19 // This class will be conditionally #included by jaws3/Asynch_IO.cpp
20 // if the given platform supports POSIX or WIN32 asynch IO.
23 static JAWS_EC_AH_Adapter
* make (JAWS_Event_Completer
*);
25 void handle_read_stream (const ACE_Asynch_Read_Stream::Result
&result
);
27 void handle_write_stream (const ACE_Asynch_Write_Stream::Result
&result
);
29 void handle_transmit_file (const ACE_Asynch_Transmit_File::Result
&result
);
32 JAWS_EC_AH_Adapter (JAWS_Event_Completer
*completer
)
33 : completer_ (completer
)
38 JAWS_Event_Result
make_io_result ( const ACE_Asynch_Result
&result
39 , JAWS_Event_Result::JE_REASON reason_ok
40 , JAWS_Event_Result::JE_REASON reason_fail
44 JAWS_Event_Completer
*completer_
;
47 #endif /* JAWS_ASYNCH_IO_HELPERS_H */