[ECOS] Misguided error code in net code?

Trenton D. Adams tadams@extremeeng.com
Fri Jul 20 08:06:00 GMT 2001


  > 
  > "Trenton D. Adams" wrote:
  > >
  > > I might just do that if I have problems in the future with it when
I
  > get
  > > down to actually writing some real net code.  The thing I find
weird,
  > is
  > > how you supposed to tell if a connection has been reset?  I
suppose I
  > > could go over to the other system and see if it disconnected, but
  > that's
  > > just a work around.
  > 
  > You could use select() or possibly write() may give different
answers.
  > 

I just used write (), and it returns 360 ETIMEDOUT.  This is slightly
better.  I (me alone ;) ) would expect that an ETIMEDOUT error should
only occur when the connection is still there but there is no response
from the other end.

When this happens on Linux or windows though, I do actually get a
ECONNRESET.  I'm not positive about the Linux side, but windows
definitely does.



More information about the Ecos-discuss mailing list