3 // ===================================================================
5 * @file IIOP_Transport.h
7 * @author Originally by Fred Kuhns <fredk@cs.wustl.edu>
8 * @author Modified by Balachandran Natarajan <bala@cs.wustl.edu>
10 // ===================================================================
12 #ifndef TAO_IIOP_TRANSPORT_H
13 #define TAO_IIOP_TRANSPORT_H
15 #include /**/ "ace/pre.h"
17 #include "tao/orbconf.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
25 #include "tao/Transport.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 class ListenPointList
;
35 class TAO_IIOP_Connection_Handler
;
37 class TAO_Operation_Details
;
42 * @class TAO_IIOP_Transport
44 * @brief Specialization of the base TAO_Transport class to handle the
47 * Specialization of the base TAO_Transport class to handle the IIOP
50 class TAO_Export TAO_IIOP_Transport
: public TAO_Transport
54 TAO_IIOP_Transport (TAO_IIOP_Connection_Handler
*handler
,
55 TAO_ORB_Core
*orb_core
);
60 * Protected destructor to enforce proper memory management through
61 * the reference counting mechanism.
63 virtual ~TAO_IIOP_Transport ();
65 /** @name Overridden Template Methods
67 * Please check the documentation in "tao/Transport.h" for more
71 virtual ACE_Event_Handler
* event_handler_i ();
73 virtual ssize_t
send (iovec
*iov
, int iovcnt
,
74 size_t &bytes_transferred
,
75 const ACE_Time_Value
*timeout
= 0);
77 #if TAO_HAS_SENDFILE == 1
78 virtual ssize_t
sendfile (TAO_MMAP_Allocator
* allocator
,
81 size_t &bytes_transferred
,
82 TAO::Transport::Drain_Constraints
const & dc
);
83 #endif /* TAO_HAS_SENDFILE==1 */
85 virtual ssize_t
recv (char *buf
, size_t len
, const ACE_Time_Value
*s
= 0);
88 /// Bridge method to call a similar method on the connection handler
89 void update_protocol_properties (int send_buffer_size
,
92 int enable_network_priority
);
94 /// @todo These methods IMHO should have more meaningful
95 /// names. The names seem to indicate nothing.
96 virtual int send_request (TAO_Stub
*stub
,
97 TAO_ORB_Core
*orb_core
,
98 TAO_OutputCDR
&stream
,
99 TAO_Message_Semantics message_semantics
,
100 ACE_Time_Value
*max_wait_time
);
102 virtual int send_message (TAO_OutputCDR
&stream
,
104 TAO_ServerRequest
*request
= 0,
105 TAO_Message_Semantics message_semantics
= TAO_Message_Semantics (),
106 ACE_Time_Value
*max_time_wait
= 0);
108 virtual int tear_listen_point_list (TAO_InputCDR
&cdr
);
110 virtual TAO_Connection_Handler
* connection_handler_i ();
114 /// Set the Bidirectional context info in the service context list
115 void set_bidir_context_info (TAO_Operation_Details
&opdetails
);
117 /// Add the listen points in @a acceptor to the @a listen_point_list
118 /// if this connection is in the same interface as that of the
119 /// endpoints in the @a acceptor
120 int get_listen_point (IIOP::ListenPointList
&listen_point_list
,
121 TAO_Acceptor
*acceptor
);
123 /// The connection service handler used for accessing lower layer
124 /// communication protocols.
125 TAO_IIOP_Connection_Handler
*connection_handler_
;
128 TAO_END_VERSIONED_NAMESPACE_DECL
130 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */
132 #include /**/ "ace/post.h"
134 #endif /* TAO_IIOP_TRANSPORT_H */