[omniORB] Using TCP_USER_TIMEOUT in OmniORB4.1.6 ?

Duncan Grisby duncan at grisby.org
Fri Dec 12 12:09:37 GMT 2014


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 --





More information about the omniORB-list mailing list