Archived

This forum has been archived. Please start a new discussion on GitHub.

can tcp oneway failure go unnoticted?

I see in the documentation that oneway invocations only wait on the local tcp/ip stack and do not return socket failures. My question is: can a tcp oneway invocation on a proxy fail due to a SyscallException (or derived), but the proxy recovers, and proceeds without problem. My situation is that I want to be able to make non-blocking reliable invocations. Its ok to lose an invocation, but only if I know no subsequent reliable invocations will succeed. Is tcp oneway safe for this use or should I stick with two-way?

Comments

  • benoit
    benoit Rennes, France
    A oneway invocation will raise an exception if the oneway request can't be sent because the connection can't be established. For example, if you client invokes on your server with oneway requests and at some point your server dies, the connection will eventually get closed and your client will try again to establish the connection. If the connection can't be establish again, you'll get an exception from the oneway invocation.

    You can easily try this with the demo/Ice/hello demo where you can start the server and client and send oneway requests. If you kill the server while you send oneway requests, you'll see that the client reports the failure when trying to send a oneway request.

    Benoit.