Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.3

Request #19335 IPv6 support
Submitted: 2012-03-16 05:42 UTC
From: ingnu Assigned:
Status: Open Package: Net_Server (version 1.0.3)
PHP Version: 5.3.3 OS: Debian GNU/Linux Squeeze
Roadmaps: (Not assigned)    
Subscription  


 [2012-03-16 05:42 UTC] ingnu (Jimmy Rudolf)
Description: ------------ The static function create from the Server.php file should check if the host passed in parameter is an IPv6 address, in order to pass the parameter AF_INET6 to the driver constructor.

Comments

 [2012-03-16 18:07 UTC] doconnor (Daniel O'Connor)
Any chance of a quick patch/pull request?
 [2012-03-16 18:18 UTC] ingnu (Jimmy Rudolf)
I wrote this code extract to check if a IP address is valid, if it is a IPv6 or a IPv4 address, and extract port number if specified. See it at http://pastebin.com/kaAaTvky. It requires Net_IPv6 and Net_IPv4 packages. It can be used to parse the $host variable of the main Net_Server constructor, and modify accordingly both the server address, the server port and the domain (AF_INET/AF_INET6).
 [2012-03-16 18:20 UTC] ingnu (Jimmy Rudolf)
Sorry, I forgot to edit some code. Here is the new "version" : http://pastebin.com/gMdarz9x