The function feof() tests the end-of-file indicator for the stream pointed to by stream, returning nonzero if it is set. The end-of-file indicator can be cleared only by the function clearerr(). feof. POSIX specification: www.doorway.ru Gnulib module: Portability problems fixed by Gnulib. Please note that feof() used with TCP-Connections, returns false as long as the connection is open. It even returns false when there is no data available. BTW: Using feof() with HTTP for a single request, you should always make sure that you set the HTTP-Header "Connection" to "close" and _not_ to "keep-alive".
C library function - feof(), The C library function int feof(FILE *stream) tests the end-of-file indicator for the given stream. The functions clearerr(), feof(), and ferror() conform to C89, C99, POSIX, and POSIX The function fileno () conforms to POSIX and POSIX SEE ALSO. Please note that feof() used with TCP-Connections, returns false as long as the connection is open. It even returns false when there is no data available. BTW: Using feof() with HTTP for a single request, you should always make sure that you set the HTTP-Header "Connection" to "close" and _not_ to "keep-alive".
ferror(3) BSD Library Functions Manual ferror(3). NAME. clearerr, clearerr_unlocked, feof, feof_unlocked, ferror, ferror_unlocked, fileno. Nov It executes more than I'd like,I tried to rewrite my code in this manner (or another similiar to this), Why does the manual to my floor. clearerr void clearerr(FILE far *stream). DESCRIPTION. Stream to clear errors on. RETURN VALUE. None. HEADER stdio.h. SEE ALSO feof, ferror, perror.
0コメント