[omniORB] Client disconnect event
Wernke zur Borg
wernke.zur.borg at vega.de
Fri Oct 13 09:39:14 BST 2006
>
> Hi everybody,
>
> This question may have been asked before, but is there a way
> in omniORB
> to know if a client has disconnected?
>
> I'm aware that we can build that into the IDL and have the
> client call
> the server before it exits, ie. a clean shutdown. However, I'm more
> interested in detecting unexpected client disconnects, such
> as network
> failure, crashes, which usually have to be detected at the socket
> level? Is there such an event in omniORB?
>
> Thanks,
> Tuyen
>
There is no concept of a high-level connection between client and
server. Conceptually CORBA maintains a transport connection only for the
duration of a single operation. If this breaks during the operation the
invoker will be notified with an exception.
If you need a connection oriented application protocol you will have to
build something into your IDL. For instance, you could think of a
"Session" interface that once established is regularly polled to be
alive with a suitable operation. For instance, we are using a simple
Session::alive() operation which the client must call every so many
seconds, and which the server expects to be called by the client. The
operation does nothing but return, and as long as it returns, the
session is ok.
Regards, Wernke
More information about the omniORB-list
mailing list