Discussion:
[omniORB] TCP connection lost
Alessandro Ricci
2007-03-02 22:58:55 UTC
Permalink
I have been using omniORB for a couple of years now, but never come
across a problem like this. I need to get a particular exception when my
TCP connection between client and server is unexpectedly closed. I have
tried to use setClientCallTimeout to set a global or a punctual timeout
that wake up the client when server doesn't reply in a reasonable time
but it is not what I really need. How OmniORB is noticed that the
connection is lost? Does it wait for socket timeout?
What I have now is that OmniORB is blocked inside call
omni:tcpConnection:Recv( pd_socket, (char*)buf, sz,0) where pd_socket is
a value, buf is a void* different from NULL and sz is another value.


Thank you.



________________________________________________________________________
_______



Alessandro Ricci

***@eidosmedia.com

Office Phone: +39-02-30174.339 Fax: +39-02-30174.330





EidosMedia S.p.A. -Viale Legioni Romane, 43 - 20147 Milano - Italy

http://www.eidosmedia.com/

________________________________________________________________________
_______



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070302/8307671e/attachment.htm
Alessandro Ricci
2007-03-02 23:01:59 UTC
Permalink
I have been using omniORB for a couple of years now, but never come
across a problem like this. I need to get a particular exception when my
TCP connection between client and server is unexpectedly closed. I have
tried to use setClientCallTimeout to set a global or a punctual timeout
that wake up the client when server doesn't reply in a reasonable time
but it is not what I really need. How OmniORB is noticed that the
connection is lost? Does it wait for socket timeout?
What I have now is that OmniORB is blocked inside call
omni:tcpConnection:Recv( pd_socket, (char*)buf, sz,0) where pd_socket is
a value, buf is a void* different from NULL and sz is another value.
Other two parameters, pd_deadline_secs and pd_deadline_nanosecos are set
to 0 by the caller, that is omni:giopStream:inputMessage.


Thank you.



________________________________________________________________________
_______



Alessandro Ricci

***@eidosmedia.com

Office Phone: +39-02-30174.339 Fax: +39-02-30174.330





EidosMedia S.p.A. -Viale Legioni Romane, 43 - 20147 Milano - Italy

http://www.eidosmedia.com/

________________________________________________________________________
_______



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.omniorb-support.com/pipermail/omniorb-list/attachments/20070302/611d5569/attachment-0001.htm
Duncan Grisby
2007-03-09 21:06:01 UTC
Permalink
Post by Alessandro Ricci
I have been using omniORB for a couple of years now, but never come
across a problem like this. I need to get a particular exception when my
TCP connection between client and server is unexpectedly closed. I have
tried to use setClientCallTimeout to set a global or a punctual timeout
that wake up the client when server doesn't reply in a reasonable time
but it is not what I really need. How OmniORB is noticed that the
connection is lost? Does it wait for socket timeout?
What I have now is that OmniORB is blocked inside call
omni:tcpConnection:Recv( pd_socket, (char*)buf, sz,0) where pd_socket is
a value, buf is a void* different from NULL and sz is another value.
Other two parameters, pd_deadline_secs and pd_deadline_nanosecos are set
to 0 by the caller, that is omni:giopStream:inputMessage.
If you don't give omniORB a call timeout, it relies on the TCP stack to
tell it if the connection fails. In your case, TCP isn't reporting any
errors to omniORB, so omniORB doesn't know anything is wrong. Unless you
are sending data across a TCP connection, you don't get to know that it
has broken.

Cheers,

Duncan.
--
-- Duncan Grisby --
-- ***@grisby.org --
-- http://www.grisby.org --
Continue reading on narkive:
Loading...