Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef TAO_COIOP_TRANSPORT_H
00014 #define TAO_COIOP_TRANSPORT_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "tao/orbconf.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif
00023
00024 #if defined (TAO_HAS_COIOP) && (TAO_HAS_COIOP != 0)
00025
00026 #include "tao/Strategies/strategies_export.h"
00027 #include "tao/Transport.h"
00028 #include "ace/SOCK_Stream.h"
00029 #include "ace/Svc_Handler.h"
00030
00031 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00032
00033
00034 class TAO_COIOP_Connection_Handler;
00035 class TAO_ORB_Core;
00036 class TAO_Operation_Details;
00037 class TAO_Acceptor;
00038
00039
00040 typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
00041 TAO_COIOP_SVC_HANDLER;
00042
00043
00044
00045
00046
00047
00048
00049 class TAO_Strategies_Export TAO_COIOP_Transport : public TAO_Transport
00050 {
00051 public:
00052
00053
00054 TAO_COIOP_Transport (TAO_COIOP_Connection_Handler *handler,
00055 TAO_ORB_Core *orb_core);
00056
00057
00058 ~TAO_COIOP_Transport (void);
00059
00060
00061 virtual int handle_input (TAO_Resume_Handle &rh,
00062 ACE_Time_Value *max_wait_time = 0);
00063 protected:
00064
00065
00066
00067
00068
00069
00070 virtual ACE_Event_Handler * event_handler_i (void);
00071 virtual TAO_Connection_Handler *connection_handler_i (void);
00072
00073
00074 virtual ssize_t send (iovec *iov, int iovcnt,
00075 size_t &bytes_transferred,
00076 const ACE_Time_Value *max_wait_time);
00077
00078
00079 virtual ssize_t recv (char *buf,
00080 size_t len,
00081 const ACE_Time_Value *s = 0);
00082
00083 virtual int send_message_shared (TAO_Stub *stub,
00084 TAO_Message_Semantics message_semantics,
00085 const ACE_Message_Block *message_block,
00086 ACE_Time_Value *max_wait_time);
00087
00088 virtual int register_handler (void);
00089
00090
00091 public:
00092
00093
00094 virtual int send_request (TAO_Stub *stub,
00095 TAO_ORB_Core *orb_core,
00096 TAO_OutputCDR &stream,
00097 TAO_Message_Semantics message_semantics,
00098 ACE_Time_Value *max_wait_time);
00099
00100 virtual int send_message (TAO_OutputCDR &stream,
00101 TAO_Stub *stub = 0,
00102 TAO_Message_Semantics message_semantics = TAO_TWOWAY_REQUEST,
00103 ACE_Time_Value *max_time_wait = 0);
00104
00105 private:
00106
00107
00108
00109 TAO_COIOP_Connection_Handler *connection_handler_;
00110 };
00111
00112 TAO_END_VERSIONED_NAMESPACE_DECL
00113
00114 #endif
00115
00116 #include "ace/post.h"
00117
00118 #endif