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_Pluggable_Messaging;
00038 class TAO_Acceptor;
00039
00040
00041 typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
00042 TAO_COIOP_SVC_HANDLER;
00043
00044
00045
00046
00047
00048
00049
00050 class TAO_Strategies_Export TAO_COIOP_Transport : public TAO_Transport
00051 {
00052 public:
00053
00054
00055 TAO_COIOP_Transport (TAO_COIOP_Connection_Handler *handler,
00056 TAO_ORB_Core *orb_core);
00057
00058
00059 ~TAO_COIOP_Transport (void);
00060
00061
00062 virtual int handle_input (TAO_Resume_Handle &rh,
00063 ACE_Time_Value *max_wait_time = 0);
00064 protected:
00065
00066
00067
00068
00069
00070
00071 virtual ACE_Event_Handler * event_handler_i (void);
00072 virtual TAO_Connection_Handler *connection_handler_i (void);
00073 virtual TAO_Pluggable_Messaging *messaging_object (void);
00074
00075
00076 virtual ssize_t send (iovec *iov, int iovcnt,
00077 size_t &bytes_transferred,
00078 const ACE_Time_Value *max_wait_time);
00079
00080
00081 virtual ssize_t recv (char *buf,
00082 size_t len,
00083 const ACE_Time_Value *s = 0);
00084
00085 virtual int send_message_shared (TAO_Stub *stub,
00086 int message_semantics,
00087 const ACE_Message_Block *message_block,
00088 ACE_Time_Value *max_wait_time);
00089
00090 virtual int register_handler (void);
00091
00092
00093 public:
00094
00095
00096 virtual int send_request (TAO_Stub *stub,
00097 TAO_ORB_Core *orb_core,
00098 TAO_OutputCDR &stream,
00099 int message_semantics,
00100 ACE_Time_Value *max_wait_time);
00101
00102 virtual int send_message (TAO_OutputCDR &stream,
00103 TAO_Stub *stub = 0,
00104 int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00105 ACE_Time_Value *max_time_wait = 0);
00106
00107
00108 virtual int messaging_init (CORBA::Octet major,
00109 CORBA::Octet minor);
00110
00111 private:
00112
00113
00114
00115 TAO_COIOP_Connection_Handler *connection_handler_;
00116
00117
00118 TAO_Pluggable_Messaging *messaging_object_;
00119 };
00120
00121 TAO_END_VERSIONED_NAMESPACE_DECL
00122
00123 #endif
00124
00125 #include "ace/post.h"
00126
00127 #endif