[fpc-pascal]How to get read-timeouts when reading sockets?
pfv at cooldown.demon.nl
Fri Jun 8 09:39:15 CEST 2001
> Yesterday evening I tried to build a little telnet-program, just to
> test the IP-socket-implementation.
> I took the finger-sourcecode, but I got the problem, that I couldn't
> determine if there were any data left to read. The eof seems to occur
> only when the socket is closed?
> Additionally it seems important to me that there is a timeout when
> waiting for data just because otherwise a non-standard answer could
> block this program.
You need to use select()
More information about the fpc-pascal