This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Misguided error code in net code?


  > 
  > "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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]