Hi,

This may be an odd suggestion/request, and nothing in the line of what's
currently hot around here (PHP 5.1 that is), but I'm making it anyway:

The current behavior of socket_recvfrom() (/etc/sockets/socket.h) on a
connection error, is that it frees the buffer (recv_buf), throws an error
and returns from the function. I'd like to suggest that more correct
behaviour would be to use the buffer before returning. As far as I know,
even on failure, the buffer can be used to extract information on why the
connection was refused.

I came upon this while I was trying to implement a traceroute algorithm,
which should be pretty simple, but seems impossible because of this socket
behavior in PHP. The change in the code of socket_recvfrom() would be very
minimal. I would suggest a patch myself, but the problems are that I don't
know how and I don't know nearly enough about the PHP engine to write solid
code for it (maybe I should work on that).

Ron

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to