3 #endif /*JAWS_BUILD_DLL*/
5 #include "ace/OS_NS_strings.h"
7 #include "jaws3/Jaws_IO.h"
8 #include "jaws3/Asynch_IO.h"
9 #include "jaws3/Synch_IO.h"
10 #include "jaws3/Reactive_IO.h"
11 #include "jaws3/Options.h"
13 JAWS_IO::JAWS_IO (JAWS_IO_Impl
*impl
)
16 // Use synchronous IO by default. It is the most efficient
17 // in terms of calls needed, but provides the least amount
18 // of support for concurrency.
22 const char *io_type
= JAWS_Options::instance ()->getenv ("JAWS_IO");
24 io_type
= JAWS_DEFAULT_IO
;
26 if (ACE_OS::strcasecmp (io_type
, "SYNCH") == 0)
27 this->impl_
= JAWS_Synch_IO::instance ();
28 else if (ACE_OS::strcasecmp (io_type
, "ASYNCH") == 0)
29 this->impl_
= JAWS_Asynch_IO::instance ();
30 else if (ACE_OS::strcasecmp (io_type
, "REACTIVE") == 0)
31 this->impl_
= JAWS_Reactive_IO::instance ();
33 this->impl_
= JAWS_Synch_IO::instance ();
43 JAWS_IO::send ( ACE_HANDLE handle
44 , ACE_Message_Block
*mb
45 , JAWS_Event_Completer
*completer
49 this->impl_
->send (handle
, mb
, completer
, act
);
54 JAWS_IO::recv ( ACE_HANDLE handle
55 , ACE_Message_Block
*mb
56 , JAWS_Event_Completer
*completer
60 this->impl_
->recv (handle
, mb
, completer
, act
);
65 JAWS_IO::transmit ( ACE_HANDLE handle
67 , JAWS_Event_Completer
*completer
69 , ACE_Message_Block
*header
70 , ACE_Message_Block
*trailer
73 this->impl_
->transmit (handle
, source
, completer
, act
, header
, trailer
);
78 JAWS_IO::send ( ACE_HANDLE handle
79 , ACE_Message_Block
*mb
80 , JAWS_Event_Completer
*completer
81 , const ACE_Time_Value
&tv
85 this->impl_
->send (handle
, mb
, completer
, tv
, act
);
90 JAWS_IO::recv ( ACE_HANDLE handle
91 , ACE_Message_Block
*mb
92 , JAWS_Event_Completer
*completer
93 , const ACE_Time_Value
&tv
97 this->impl_
->recv (handle
, mb
, completer
, tv
, act
);
102 JAWS_IO::transmit ( ACE_HANDLE handle
104 , JAWS_Event_Completer
*completer
105 , const ACE_Time_Value
&tv
107 , ACE_Message_Block
*header
108 , ACE_Message_Block
*trailer
111 this->impl_
->transmit (handle
, source
, completer
, tv
, act
, header
, trailer
);