Re: Socket Rework Complete

From: Date: Fri, 08 Mar 2002 09:48:23 +0000
Subject: Re: Socket Rework Complete
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-80920@lists.php.net to get a copy of this message
> For all those who don't follow CVS. The sockets extension modifications > I listed out a few weeks ago are complete, and will be included in the > 4.2.0 release. I haven't been following CVS, nor have I really paid a lot of attention to the module. I have received the occasional email about the extension though, the most recent one being in relation to socket_select(). In the current CVS, there is a bug in the socket_select() function that causes it to only return success or failure (RETURN_LONG(retval)), which, if I'm not mistaken about the rest of the API changes, should be changed to reflect a true/false value. It also doesn't give you access to the error which occured (since retval only represents the return of socket(), but nothing about the actual reason for failure), which is more the bug than anything. The way I would go about fixing it would be to change socket_select() to return true or false, and if there was an error (as indicated by retval), store errno somewhere and let socket_last_error()/socket_clear_error() retrieve that value if there isn't a socket specified. I've attached a unified diff of the changes to make. The changes are untested (I need to actually check out a complete version before making the changes...), but they should compile and work cleanly. (No guarantees.) Chris

« previous php.dev (#80920) next »