[omniORB] how to add a liiiitle bit verification to oneway functions

Duncan Grisby duncan@grisby.org
Wed Jul 17 11:35:02 2002


On Tuesday 16 July, Andrey Koubychev wrote:

>       I understand that oneway is not reliable way of calling
>       functions. But I have following situation with omniOrb 3.0.4:
>       If server is suddenly disconnected, and client execute oneway
>       call, 1st call always succeeds, on 2nd call client gets an
>       exception. Is it possible (maybe with some hack) to have exception at
>       the first time WITH ONEWAY functions.

I'm afraid not. The way oneways are sent means that any errors that
come from the TCP connection are not noticed before the oneway call
returns to the client. It's only on the next call that the socket
error is noticed. It would be impossible to know how long to wait to
see if an error occurred.

Notice that it's not sufficient to know that the TCP stack
successfully sent the packets for the request. If the other side is
closing the connection at the same time, the TCP end-of-stream
notification may be in flight over the network at the same time as the
request. If a TCP connection is closed just after sending a oneway,
the only way to tell if the server got it or not would be to reconnect
and ask it.

Cheers,

Duncan.

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