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]
Other format: [Raw text]

Re: network problems


> Another question, does anybody know if there is an ioctl() or similar for 
> checking if a TCP connaction is still alive?

Guessing here... But if the connection is dead, the socket should be
no longer valid. Thus ferror(3) should return something useful. If it
does not return an error, assume the connection is still alive. 

Have you set the keepalive option. If you don't have this option set
and there is no traffic, the stack will not notice the connection is
dead until the next time you try to send something. With keepalive
set, it sends ACK messages every so often so it can detect dead
connections.

   Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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