Merge pull request #2309 from mitza-oci/warnings
[ACE_TAO.git] / ACE / apps / JAWS3 / jaws3 / Jaws_IO.cpp
blob1e7648bb88458c2f2079f7338543d9c7f360d692
1 #ifndef JAWS_BUILD_DLL
2 #define JAWS_BUILD_DLL
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)
14 : 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.
20 if (this->impl_ == 0)
22 const char *io_type = JAWS_Options::instance ()->getenv ("JAWS_IO");
23 if (io_type == 0)
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 ();
32 else
33 this->impl_ = JAWS_Synch_IO::instance ();
37 JAWS_IO::~JAWS_IO ()
42 void
43 JAWS_IO::send ( ACE_HANDLE handle
44 , ACE_Message_Block *mb
45 , JAWS_Event_Completer *completer
46 , void *act
49 this->impl_->send (handle, mb, completer, act);
53 void
54 JAWS_IO::recv ( ACE_HANDLE handle
55 , ACE_Message_Block *mb
56 , JAWS_Event_Completer *completer
57 , void *act
60 this->impl_->recv (handle, mb, completer, act);
64 void
65 JAWS_IO::transmit ( ACE_HANDLE handle
66 , ACE_HANDLE source
67 , JAWS_Event_Completer *completer
68 , void *act
69 , ACE_Message_Block *header
70 , ACE_Message_Block *trailer
73 this->impl_->transmit (handle, source, completer, act, header, trailer);
77 void
78 JAWS_IO::send ( ACE_HANDLE handle
79 , ACE_Message_Block *mb
80 , JAWS_Event_Completer *completer
81 , const ACE_Time_Value &tv
82 , void *act
85 this->impl_->send (handle, mb, completer, tv, act);
89 void
90 JAWS_IO::recv ( ACE_HANDLE handle
91 , ACE_Message_Block *mb
92 , JAWS_Event_Completer *completer
93 , const ACE_Time_Value &tv
94 , void *act
97 this->impl_->recv (handle, mb, completer, tv, act);
101 void
102 JAWS_IO::transmit ( ACE_HANDLE handle
103 , ACE_HANDLE source
104 , JAWS_Event_Completer *completer
105 , const ACE_Time_Value &tv
106 , void *act
107 , ACE_Message_Block *header
108 , ACE_Message_Block *trailer
111 this->impl_->transmit (handle, source, completer, tv, act, header, trailer);