[ECOS] network problems

Roland Caßebohm roland.cassebohm@visionsystems.de
Thu Apr 10 14:09:00 GMT 2003


On Donnerstag, 10. April 2003 13:32, Andrew Lunn wrote:
> > My problem is, I use select to wait for multiple inputs including the
> > socket. Normally I recognize the a connection was closed by peer if
> > read() returns 0 or I get an error while write().
> > But sometimes I have the case, the I stop reading and writing to the
> > socket for some reasons. So I just don't set the corresponding bit in the
> > fdset. but in such state I can't recognize if the connection is closed.
>
> Try setting the bit in exceptfds. I think select will then report when
> the socket is closed.
>
>     Andrew

Thnk you, I will look what will happen with exceptfds if the connection will 
close.

Roland

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



More information about the Ecos-discuss mailing list