in reply to Re: Problem with non-blocking sockets example from Cookbook - send() vs EWOULDBLOCK
in thread Problem with non-blocking sockets example from Cookbook - send() vs EWOULDBLOCK

$! is not set at all, either in string form ("$!") or numerical form. The return value is set to the length that did send (not all of it).

I'm asking if the return value from send(2) will always be -1 if Errno is set, or are there cases where an Errno can be set, yet some data still sent. I don't think there is, yet the Cookbook code suggests that EWOULDBLOCK is such a case. My testing shows this to be incorrect (at least on Linux).

If I generates a script that provided the example case, would people test it on their platform?

Macdee

  • Comment on Re: Re: Problem with non-blocking sockets example from Cookbook - send() vs EWOULDBLOCK