=default for generated implementation copy ctor
[ACE_TAO.git] / TAO / tao / Strategies / COIOP_Transport.h
blobf8be9978d7857874cb610b2293a556b88aff1912
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file COIOP_Transport.h
7 * @author Johnny Willemsen <jwillemsen@remedy.nl>
8 */
9 //=============================================================================
11 #ifndef TAO_COIOP_TRANSPORT_H
12 #define TAO_COIOP_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_COIOP) && (TAO_HAS_COIOP != 0)
24 #include "tao/Strategies/strategies_export.h"
25 #include "tao/Transport.h"
26 #include "ace/SOCK_Stream.h"
27 #include "ace/Svc_Handler.h"
29 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
31 // Forward decls.
32 class TAO_COIOP_Connection_Handler;
33 class TAO_ORB_Core;
34 class TAO_Operation_Details;
35 class TAO_Acceptor;
37 // Service Handler for this transport
38 typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
39 TAO_COIOP_SVC_HANDLER;
41 /**
42 * @class TAO_COIOP_Transport
44 * @brief Specialization of the base TAO_Transport class to handle the
45 * COIOP protocol.
47 class TAO_Strategies_Export TAO_COIOP_Transport : public TAO_Transport
49 public:
50 /// Constructor.
51 TAO_COIOP_Transport (TAO_COIOP_Connection_Handler *handler,
52 TAO_ORB_Core *orb_core);
54 /// Default destructor.
55 ~TAO_COIOP_Transport () = default;
57 /// Look for the documentation in Transport.h.
58 virtual int handle_input (TAO_Resume_Handle &rh,
59 ACE_Time_Value *max_wait_time = 0);
60 protected:
61 /** @name Overridden Template Methods
63 * These are implementations of template methods declared by TAO_Transport.
65 //@{
66 virtual ACE_Event_Handler * event_handler_i ();
67 virtual TAO_Connection_Handler *connection_handler_i ();
69 /// Write the complete Message_Block chain to the connection.
70 virtual ssize_t send (iovec *iov, int iovcnt,
71 size_t &bytes_transferred,
72 const ACE_Time_Value *max_wait_time);
74 /// Read len bytes from into buf.
75 virtual ssize_t recv (char *buf,
76 size_t len,
77 const ACE_Time_Value *s = 0);
79 virtual int send_message_shared (TAO_Stub *stub,
80 TAO_Message_Semantics message_semantics,
81 const ACE_Message_Block *message_block,
82 ACE_Time_Value *max_wait_time);
84 virtual int register_handler ();
86 ///@}
87 public:
88 /// @todo These methods IMHO should have more meaningful names.
89 /// The names seem to indicate nothing.
90 virtual int send_request (TAO_Stub *stub,
91 TAO_ORB_Core *orb_core,
92 TAO_OutputCDR &stream,
93 TAO_Message_Semantics message_semantics,
94 ACE_Time_Value *max_wait_time);
96 virtual int send_message (TAO_OutputCDR &stream,
97 TAO_Stub *stub = 0,
98 TAO_ServerRequest *request = 0,
99 TAO_Message_Semantics message_semantics = TAO_Message_Semantics (),
100 ACE_Time_Value *max_time_wait = 0);
102 private:
103 /// The connection service handler used for accessing lower layer
104 /// communication protocols.
105 TAO_COIOP_Connection_Handler *connection_handler_;
108 TAO_END_VERSIONED_NAMESPACE_DECL
110 #endif /* TAO_HAS_COIOP && TAO_HAS_COIOP != 0 */
112 #include /**/ "ace/post.h"
114 #endif /* TAO_COIOP_TRANSPORT_H */