Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Strategies / DIOP_Transport.h
blob2dbd1b46019223b5786eab441a8df150ea725719
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file DIOP_Transport.h
7 * @author Michael Kircher
8 */
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)
19 # 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
35 // Forward decls.
36 class TAO_DIOP_Connection_Handler;
37 class TAO_ORB_Core;
38 class TAO_Operation_Details;
39 class TAO_Acceptor;
41 // Service Handler for this transport
42 typedef ACE_Svc_Handler<ACE_SOCK_DGRAM, ACE_NULL_SYNCH>
43 TAO_DIOP_SVC_HANDLER;
45 /**
46 * @class TAO_DIOP_Transport
48 * @brief Specialization of the base TAO_Transport class to handle the
49 * DIOP protocol.
51 class TAO_Strategies_Export TAO_DIOP_Transport : public TAO_Transport
53 public:
54 /// Constructor.
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);
64 protected:
65 /** @name Overridden Template Methods
67 * These are implementations of template methods declared by TAO_Transport.
69 //@{
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,
80 size_t len,
81 const ACE_Time_Value *s = 0);
83 virtual int register_handler ();
85 ///@}
86 public:
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,
96 TAO_Stub *stub = 0,
97 TAO_ServerRequest *request = 0,
98 TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
99 ACE_Time_Value *max_time_wait = 0);
101 private:
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 */