diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 08:02:58 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 08:02:58 +0000 |
commit | e588f487fe14b34a642a62bd0cb53877a42b4793 (patch) | |
tree | 8c0bc2f7aa508472a4fd98dfca9d6afd60130f52 /TAO/tao/IIOP_Transport.cpp | |
parent | ad7f2d4ae4273710073d841fe5afccaf14e6718a (diff) | |
download | ATCD-e588f487fe14b34a642a62bd0cb53877a42b4793.tar.gz |
ChangeLogTag:Tue Apr 24 00:21:54 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'TAO/tao/IIOP_Transport.cpp')
-rw-r--r-- | TAO/tao/IIOP_Transport.cpp | 66 |
1 files changed, 26 insertions, 40 deletions
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index 4799b62a1e5..d927938164d 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -1,5 +1,4 @@ // This may look like C, but it's really -*- C++ -*- -// // $Id$ #include "tao/IIOP_Transport.h" @@ -23,9 +22,7 @@ # include "tao/IIOP_Transport.i" #endif /* ! __ACE_INLINE__ */ -ACE_RCSID (TAO, - IIOP_Transport, - "$Id$") +ACE_RCSID (tao, IIOP_Transport, "$Id$") TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler, TAO_ORB_Core *orb_core, @@ -54,14 +51,6 @@ TAO_IIOP_Transport::~TAO_IIOP_Transport (void) delete this->messaging_object_; } -#if 0 -ACE_HANDLE -TAO_IIOP_Transport::handle (void) -{ - return this->connection_handler_->get_handle (); -} -#endif - ACE_Event_Handler * TAO_IIOP_Transport::event_handler_i (void) { @@ -75,14 +64,16 @@ TAO_IIOP_Transport::messaging_object (void) } ssize_t -TAO_IIOP_Transport::send_i (const ACE_Message_Block *message_block, - const ACE_Time_Value *max_wait_time, - size_t *bytes_transferred) +TAO_IIOP_Transport::send_i (iovec *iov, int iovcnt, + size_t &bytes_transferred, + const ACE_Time_Value *max_wait_time) { - return ACE::send_n (this->connection_handler_->get_handle (), - message_block, - max_wait_time, - bytes_transferred); + ssize_t retval = this->connection_handler_->peer ().sendv (iov, iovcnt, + max_wait_time); + if (retval > 0) + bytes_transferred = retval; + + return retval; } ssize_t @@ -135,6 +126,21 @@ TAO_IIOP_Transport::read_process_message (ACE_Time_Value *max_wait_time, int TAO_IIOP_Transport::register_handler_i (void) { + if (TAO_debug_level > 4) + { + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - IIOP_Transport::register_handler %d\n", + this->id ())); + } + if (this->connection_handler_->is_registered ()) + { + ACE_DEBUG ((LM_DEBUG, + "TAO (%P|%t) - IIOP_Transport::register_handler %d" + ", already registered\n", + this->id ())); + return 0; + } + // @@ It seems like this method should go away, the right reactor is // picked at object creation time. ACE_Reactor *r = this->orb_core_->reactor (); @@ -187,7 +193,7 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream, return -1; // This guarantees to send all data (bytes) or return an error. - ssize_t n = this->send_or_buffer (stub, + ssize_t n = this->send_message_i (stub, twoway, stream.begin (), max_wait_time); @@ -203,17 +209,6 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream, return -1; } - // EOF. - if (n == 0) - { - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO: (%P|%t|%N|%l) send_message () \n") - ACE_TEXT ("EOF, closing transport %d\n"), - this->id ())); - return -1; - } - return 1; } @@ -274,7 +269,6 @@ TAO_IIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr) return this->connection_handler_->process_listen_point_list (listen_list); } - int TAO_IIOP_Transport::process_message (void) { @@ -521,11 +515,3 @@ TAO_IIOP_Transport::transition_handler_state_i (void) { this->connection_handler_ = 0; } - -#if 0 -TAO_Connection_Handler* -TAO_IIOP_Transport::connection_handler (void) const -{ - return this->connection_handler_; -} -#endif |