in reply to read aka fread(3) broken, sysread aka read(2) works IIS socket
read(), given a buffer size to read, will wait for the socket to fill up the buffer, and will block until more bytes are available. sysread() will return the number of bytes that are actually available.
Alternatively, you could use the Content-Length that the web server has returned to you (and which you've squirreled away in $length), and read() only that many bytes.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: read aka fread(3) broken, sysread aka read(2) works IIS socket
by antirice (Priest) on Sep 11, 2003 at 08:03 UTC |