summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Transport.cpp
diff options
context:
space:
mode:
authorirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-07-07 23:58:34 +0000
committerirfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-07-07 23:58:34 +0000
commit81e0a245decc09943832d52cb9f419e3f8f355b7 (patch)
tree8aaf3418082d4c3b107e2f01eedf0d55095c7ec7 /TAO/tao/IIOP_Transport.cpp
parent784fe453b13e068e3ec273b9a0f4021ac5a51e96 (diff)
downloadATCD-81e0a245decc09943832d52cb9f419e3f8f355b7.tar.gz
ChangeLogTag: Mon Jul 07 18:00:38 2003 Irfan Pyarali <irfan@oomworks.com>
Diffstat (limited to 'TAO/tao/IIOP_Transport.cpp')
-rw-r--r--TAO/tao/IIOP_Transport.cpp116
1 files changed, 16 insertions, 100 deletions
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp
index 716ec4f1cde..522a04233b6 100644
--- a/TAO/tao/IIOP_Transport.cpp
+++ b/TAO/tao/IIOP_Transport.cpp
@@ -35,13 +35,6 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
, connection_handler_ (handler)
, messaging_object_ (0)
{
- if (connection_handler_ != 0)
- {
- // REFCNT: Matches one of
- // TAO_Transport::connection_handler_close() or
- // TAO_Transport::close_connection_shared.
- this->connection_handler_->incr_refcount();
- }
if (flag)
{
// Use the lite version of the protocol
@@ -58,7 +51,6 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
TAO_IIOP_Transport::~TAO_IIOP_Transport (void)
{
- ACE_ASSERT(this->connection_handler_ == 0);
delete this->messaging_object_;
}
@@ -81,9 +73,9 @@ TAO_IIOP_Transport::messaging_object (void)
}
ssize_t
-TAO_IIOP_Transport::send_i (iovec *iov, int iovcnt,
- size_t &bytes_transferred,
- const ACE_Time_Value *max_wait_time)
+TAO_IIOP_Transport::send (iovec *iov, int iovcnt,
+ size_t &bytes_transferred,
+ const ACE_Time_Value *max_wait_time)
{
ssize_t retval = this->connection_handler_->peer ().sendv (iov, iovcnt,
max_wait_time);
@@ -94,9 +86,9 @@ TAO_IIOP_Transport::send_i (iovec *iov, int iovcnt,
}
ssize_t
-TAO_IIOP_Transport::recv_i (char *buf,
- size_t len,
- const ACE_Time_Value *max_wait_time)
+TAO_IIOP_Transport::recv (char *buf,
+ size_t len,
+ const ACE_Time_Value *max_wait_time)
{
ssize_t n = this->connection_handler_->peer ().recv (buf,
len,
@@ -121,7 +113,6 @@ TAO_IIOP_Transport::recv_i (char *buf,
if (errno == EWOULDBLOCK)
return 0;
-
return -1;
}
@@ -138,32 +129,6 @@ TAO_IIOP_Transport::recv_i (char *buf,
}
int
-TAO_IIOP_Transport::register_handler_i (void)
-{
- if (TAO_debug_level > 4)
- {
- ACE_DEBUG ((LM_DEBUG,
- "TAO (%P|%t) - IIOP_Transport[%d]::register_handler\n",
- this->id ()));
- }
-
- ACE_Reactor *r = this->orb_core_->reactor ();
-
- if (r == this->connection_handler_->reactor ())
- return 0;
-
- // Set the flag in the Connection Handler and in the Wait Strategy
- // @@Maybe we should set these flags after registering with the
- // reactor. What if the registration fails???
- this->ws_->is_registered (1);
-
- // Register the handler with the reactor
- return r->register_handler (this->connection_handler_,
- ACE_Event_Handler::READ_MASK);
-}
-
-
-int
TAO_IIOP_Transport::send_request (TAO_Stub *stub,
TAO_ORB_Core *orb_core,
TAO_OutputCDR &stream,
@@ -261,9 +226,6 @@ TAO_IIOP_Transport::send_message_shared (
{
ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->handler_lock_, -1);
- if (this->check_event_handler_i ("IIOP_Transport::send_message_shared") == -1)
- return -1;
-
if (TAO_debug_level > 6)
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("TAO (%P|%t) - ")
@@ -271,8 +233,7 @@ TAO_IIOP_Transport::send_message_shared (
ACE_TEXT ("enable_network_priority = %d\n"),
this->connection_handler_->enable_network_priority ()));
- if (this->connection_handler_ != 0)
- this->connection_handler_->set_dscp_codepoint ();
+ this->connection_handler_->set_dscp_codepoint ();
r = this->send_message_shared_i (stub, message_semantics,
message_block, max_wait_time);
@@ -309,7 +270,6 @@ TAO_IIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails,
// setup
opdetails.modify_request_id (this->bidirectional_flag ());
-
return TAO_Transport::generate_request_header (opdetails,
spec,
msg);
@@ -341,17 +301,6 @@ TAO_IIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr)
// 1 (i.e., non-originating side)
this->bidirectional_flag (1);
- // Just make sure that the connection handler is sane before we go
- // head and do anything with it.
- ACE_GUARD_RETURN (ACE_Lock,
- ace_mon,
- *this->handler_lock_,
- -1);
-
- if (this->check_event_handler_i ("IIOP_Transport::tear_listen_point_list")
- == -1)
- return -1;
-
return this->connection_handler_->process_listen_point_list (listen_list);
}
@@ -421,28 +370,16 @@ TAO_IIOP_Transport::get_listen_point (
// Get the local address of the connection
ACE_INET_Addr local_addr;
- {
- // Just make sure that the connection handler is sane before we go
- // head and do anything with it.
- ACE_GUARD_RETURN (ACE_Lock,
- ace_mon,
- *this->handler_lock_,
- -1);
-
- if (this->check_event_handler_i ("IIOP_Transport::get_listen_point")
- == -1)
- return -1;
- if (this->connection_handler_->peer ().get_local_addr (local_addr)
- == -1)
- {
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("(%P|%t) Could not resolve local ")
- ACE_TEXT ("host address in ")
- ACE_TEXT ("get_listen_point()\n")),
- -1);
- }
- }
+ if (this->connection_handler_->peer ().get_local_addr (local_addr)
+ == -1)
+ {
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_TEXT ("(%P|%t) Could not resolve local ")
+ ACE_TEXT ("host address in ")
+ ACE_TEXT ("get_listen_point()\n")),
+ -1);
+ }
// Note: Looks like there is no point in sending the list of
// endpoints on interfaces on which this connection has not
@@ -484,33 +421,12 @@ TAO_IIOP_Transport::get_listen_point (
return 1;
}
-TAO_Connection_Handler *
-TAO_IIOP_Transport::invalidate_event_handler_i (void)
-{
- TAO_Connection_Handler * eh = this->connection_handler_;
- this->connection_handler_ = 0;
- return eh;
-}
-
void
TAO_IIOP_Transport::update_protocol_properties (int snd_buf_sz,
int rcv_buf_sz,
int no_delay,
int enable_nw_prio)
{
- // Just make sure that the connection handler is sane before we go
- // head and do anything with it.
- ACE_GUARD (ACE_Lock,
- ace_mon,
- *this->handler_lock_);
-
- if (this->check_event_handler_i (
- "IIOP_Transport::update_protocol_properties") == -1)
- return;
-
- /// Making an outbound call holding a lock. This is not suposed to
- /// be done. But it would be dangerous to leave the lock since the
- /// connection handler could dissappear.
this->connection_handler_->update_protocol_properties (
snd_buf_sz,
rcv_buf_sz,