3 //=============================================================================
5 * @file DIOP_Transport.h
7 * @author Michael Kircher
9 //=============================================================================
11 #ifndef TAO_DIOP_TRANSPORT_H
12 #define TAO_DIOP_TRANSPORT_H
14 #include /**/ "ace/pre.h"
16 #include "tao/orbconf.h"
18 #if !defined (ACE_LACKS_PRAGMA_ONCE)
20 #endif /* ACE_LACKS_PRAGMA_ONCE */
22 #if defined (TAO_HAS_DIOP) && (TAO_HAS_DIOP != 0)
24 #include "tao/Strategies/strategies_export.h"
25 #include "tao/Transport.h"
26 #include "ace/SOCK_Dgram.h"
27 #include "ace/Svc_Handler.h"
29 #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
30 template class TAO_Strategies_Export ACE_Svc_Handler
<ACE_SOCK_DGRAM
, ACE_NULL_SYNCH
>;
31 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT */
33 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
36 class TAO_DIOP_Connection_Handler
;
38 class TAO_Operation_Details
;
41 // Service Handler for this transport
42 typedef ACE_Svc_Handler
<ACE_SOCK_DGRAM
, ACE_NULL_SYNCH
>
46 * @class TAO_DIOP_Transport
48 * @brief Specialization of the base TAO_Transport class to handle the
51 class TAO_Strategies_Export TAO_DIOP_Transport
: public TAO_Transport
55 TAO_DIOP_Transport (TAO_DIOP_Connection_Handler
*handler
,
56 TAO_ORB_Core
*orb_core
);
58 /// Default destructor.
59 ~TAO_DIOP_Transport () = default;
61 /// Look for the documentation in Transport.h.
62 virtual int handle_input (TAO_Resume_Handle
&rh
,
63 ACE_Time_Value
*max_wait_time
= 0);
65 /** @name Overridden Template Methods
67 * These are implementations of template methods declared by TAO_Transport.
70 virtual ACE_Event_Handler
* event_handler_i ();
71 virtual TAO_Connection_Handler
*connection_handler_i ();
73 /// Write the complete Message_Block chain to the connection.
74 virtual ssize_t
send (iovec
*iov
, int iovcnt
,
75 size_t &bytes_transferred
,
76 const ACE_Time_Value
*max_wait_time
);
78 /// Read len bytes from into buf.
79 virtual ssize_t
recv (char *buf
,
81 const ACE_Time_Value
*s
= 0);
83 virtual int register_handler ();
87 /// @todo These methods IMHO should have more meaningful names.
88 /// The names seem to indicate nothing.
89 virtual int send_request (TAO_Stub
*stub
,
90 TAO_ORB_Core
*orb_core
,
91 TAO_OutputCDR
&stream
,
92 TAO_Message_Semantics message_semantics
,
93 ACE_Time_Value
*max_wait_time
);
95 virtual int send_message (TAO_OutputCDR
&stream
,
97 TAO_ServerRequest
*request
= 0,
98 TAO_Message_Semantics message_semantics
= TAO_Message_Semantics (),
99 ACE_Time_Value
*max_time_wait
= 0);
102 /// The connection service handler used for accessing lower layer
103 /// communication protocols.
104 TAO_DIOP_Connection_Handler
*connection_handler_
;
107 TAO_END_VERSIONED_NAMESPACE_DECL
109 #endif /* TAO_HAS_DIOP && TAO_HAS_DIOP != 0 */
111 #include /**/ "ace/post.h"
113 #endif /* TAO_DIOP_TRANSPORT_H */