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 (void);
65 /** @name Overridden Template Methods
67 * Please check the documentation in "tao/Transport.h" for more
72 virtual ACE_Event_Handler
* event_handler_i (void);
74 virtual ssize_t
send (iovec
*iov
, int iovcnt
,
75 size_t &bytes_transferred
,
76 const ACE_Time_Value
*timeout
= 0);
78 #if TAO_HAS_SENDFILE == 1
79 virtual ssize_t
sendfile (TAO_MMAP_Allocator
* allocator
,
82 size_t &bytes_transferred
,
83 TAO::Transport::Drain_Constraints
const & dc
);
84 #endif /* TAO_HAS_SENDFILE==1 */
86 virtual ssize_t
recv (char *buf
, size_t len
, const ACE_Time_Value
*s
= 0);
89 /// Bridge method to call a similar method on the connection handler
90 void update_protocol_properties (int send_buffer_size
,
93 int enable_network_priority
);
95 /// @todo These methods IMHO should have more meaningful
96 /// names. The names seem to indicate nothing.
97 virtual int send_request (TAO_Stub
*stub
,
98 TAO_ORB_Core
*orb_core
,
99 TAO_OutputCDR
&stream
,
100 TAO_Message_Semantics message_semantics
,
101 ACE_Time_Value
*max_wait_time
);
103 virtual int send_message (TAO_OutputCDR
&stream
,
105 TAO_ServerRequest
*request
= 0,
106 TAO_Message_Semantics message_semantics
= TAO_Message_Semantics (),
107 ACE_Time_Value
*max_time_wait
= 0);
109 virtual int tear_listen_point_list (TAO_InputCDR
&cdr
);
111 virtual TAO_Connection_Handler
* connection_handler_i (void);
115 /// Set the Bidirectional context info in the service context list
116 void set_bidir_context_info (TAO_Operation_Details
&opdetails
);
118 /// Add the listen points in @a acceptor to the @a listen_point_list
119 /// if this connection is in the same interface as that of the
120 /// endpoints in the @a acceptor
121 int get_listen_point (IIOP::ListenPointList
&listen_point_list
,
122 TAO_Acceptor
*acceptor
);
124 /// The connection service handler used for accessing lower layer
125 /// communication protocols.
126 TAO_IIOP_Connection_Handler
*connection_handler_
;
129 TAO_END_VERSIONED_NAMESPACE_DECL
131 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */
133 #include /**/ "ace/post.h"
135 #endif /* TAO_IIOP_TRANSPORT_H */