diff options
Diffstat (limited to 'TAO/tao/IIOP_Connection_Handler.cpp')
-rw-r--r-- | TAO/tao/IIOP_Connection_Handler.cpp | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index 7073a6523fc..ddfda1fdb1b 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -89,6 +89,8 @@ TAO_IIOP_Connection_Handler::open (void*) this->orb_core ()->orb_params ()->nodelay (); protocol_properties.keep_alive_ = this->orb_core ()->orb_params ()->sock_keepalive (); + protocol_properties.dont_route_ = + this->orb_core ()->orb_params ()->sock_dontroute (); TAO_Protocols_Hooks *tph = this->orb_core ()->get_protocols_hooks (); @@ -148,6 +150,21 @@ TAO_IIOP_Connection_Handler::open (void*) } } +#if !defined (ACE_LACKS_SO_DONTROUTE) + if (protocol_properties.dont_route_) + { + if (this->peer (). + set_option (SOL_SOCKET, + SO_DONTROUTE, + (void *) &protocol_properties.dont_route_, + sizeof (protocol_properties.dont_route_)) == -1 + && errno != ENOTSUP) + { + return -1; + } + } +#endif /* ! ACE_LACKS_SO_DONTROUTE */ + if (this->transport ()->wait_strategy ()->non_blocking () || this->transport ()->opened_as () == TAO::TAO_SERVER_ROLE) { @@ -169,8 +186,9 @@ TAO_IIOP_Connection_Handler::open (void*) if (TAO_debug_level > 2) ACE_DEBUG ((LM_DEBUG, ACE_TEXT("TAO (%P|%t) - IIOP_Connection_Handler::open, ") - ACE_TEXT("The local addr is <%s> \n"), - local_addr. get_host_addr ())); + ACE_TEXT("The local addr is <%s:%d> \n"), + local_addr.get_host_addr (), + local_addr.get_port_number())); if (local_addr == remote_addr) { @@ -478,6 +496,31 @@ TAO_IIOP_Connection_Handler::set_dscp_codepoint (CORBA::Boolean set_network_prio return 0; } + +void +TAO_IIOP_Connection_Handler::abort (void) +{ + struct linger lval; + lval.l_onoff = 1; + lval.l_linger = 0; + + if (this->peer ().set_option(SOL_SOCKET, + SO_LINGER, + (void*) &lval, + sizeof (lval)) == -1) + { + if (TAO_debug_level) + { + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) Unable to set ") + ACE_TEXT ("SO_LINGER on %d\n"), + this->peer ().get_handle ())); + } + } +} + + + //@@ CONNECTION_HANDLER_SPL_COPY_HOOK_END /* * End copy hook |