Erik Larsson <(E-Mail Removed)> wrote:
> I'm having trouble a non-blocking revc(). If I'm correct shall recv()
> return the amount of bytes revived at particular moment, and return 0
> when EOF and ?1 when error.
>
> My program connects to a web server and sends the "GET / HTTP1.1?."
> the the socket starts to receive data from the web server. But recv()
> NEVER returns 0 or ?1. So the connection is never ended witch hangs
> the program there until the socket timeouts.
It sounds like its not being set non-blocking. Run it through strace to
see what the system calls are doing.
But what's the point? You're polling as well as non-blocking? You only
really need one method or the other.
--
Cameron Kerr
(E-Mail Removed) :
http://nzgeeks.org/cameron/
Empowered by Perl!