s/Uint/UInt/g
[ACE_TAO.git] / TAO / tao / IIOP_Transport.h
blob63d3496d6b4eabd7f10e724ef499c7d2a72e30a5
1 // -*- C++ -*-
3 // ===================================================================
4 /**
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>
9 */
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)
20 # 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
29 namespace IIOP
31 class ListenPointList;
34 // Forward decls.
35 class TAO_IIOP_Connection_Handler;
36 class TAO_ORB_Core;
37 class TAO_Operation_Details;
38 class TAO_Acceptor;
39 class TAO_Adapter;
41 /**
42 * @class TAO_IIOP_Transport
44 * @brief Specialization of the base TAO_Transport class to handle the
45 * IIOP protocol.
47 * Specialization of the base TAO_Transport class to handle the IIOP
48 * protocol.
50 class TAO_Export TAO_IIOP_Transport : public TAO_Transport
52 public:
53 /// Constructor.
54 TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
55 TAO_ORB_Core *orb_core);
57 protected:
58 /// Destructor
59 /**
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
68 * details.
70 //@{
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,
80 iovec * iov,
81 int iovcnt,
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);
88 public:
89 /// Bridge method to call a similar method on the connection handler
90 void update_protocol_properties (int send_buffer_size,
91 int recv_buffer_size,
92 int no_delay,
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,
104 TAO_Stub *stub = 0,
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);
112 //@}
114 private:
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);
123 private:
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 */