[omniORB] Using TCP_USER_TIMEOUT in OmniORB4.1.6 ?

Ravi K Kulkarni rkulkarn at in.ibm.com
Fri Dec 12 15:28:41 GMT 2014


Hi Duncan 
How to do and if so is there any example ?

Thanks and regards

Ravi Kumar Kulkarni
POWER Firmware Development India
MK GF 129 Manyatha K Blk
ISTL, Bangalore
Extn: 56822
Mobile :  9731371000
rkulkarn at in.ibm.com



From:   Duncan Grisby <duncan at grisby.org>
To:     Ravi K Kulkarni/India/IBM at IBMIN
Cc:     omniorb-list at omniorb-support.com
Date:   12/12/2014 05:35 PM
Subject:        Re: [omniORB] Using TCP_USER_TIMEOUT in OmniORB4.1.6 ?


On Fri, 2014-12-12 at 14:12 +0530, Ravi K Kulkarni wrote:

[...]
> So one of the option was to use TCP_USER_TIMEOUT
> ( http://man7.org/linux/man-pages/man7/tcp.7.html) so we can have a
> control over TCP to TCP communication.
>
> Questions :
>
> 1/. Is there a way to get the Socket Descriptors value from a Object
> Reference ?. If so, I can get the sockfd and then do a setsockopt

Object references do not have their own sockets -- omniORB opens
connections on demand, and reuses connections for multiple objects in
the same address space. Any particular object reference can have any
number of sockets associated with it.

> 2/. Will OmniORB provide any mechanism to make use of
> TCP_USER_TIMEOUT ?

It's not really something you are expected to do, so it is not easy to
get hold of the sockets inside omniORB's connections, but it is possible
if you access lots of omniORB internal data structures. You can define a
clientOpenConnection interceptor and then reach through the objects to
finally get to the socket. It's not pretty, though, and the headers for
some of the required class definitions are not even installed in a
normal omniORB install.

The easiest way for you to achieve it is probably to patch omniORB to
set the socket option as it opens the connections. Search for uses of
setsockopt in the code, and you'll see where you can set your additional
option.

Duncan.

--
-- Duncan Grisby         --
-- duncan at grisby.org     --
-- http://www.grisby.org --



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20141212/8e658464/attachment.html>


More information about the omniORB-list mailing list