[prev in list] [next in list] [prev in thread] [next in thread]
List: php-doc-cvs
Subject: [DOC-CVS] =?utf-8?q?svn:_/phpdoc/en/trunk/language/context/_socket.xml?=
From: Adam_Harvey <aharvey () php ! net>
Date: 2013-09-21 2:25:23
Message-ID: svn-aharvey-1379730323-331458-1262927990 () svn ! php ! net
[Download RAW message or body]
aharvey Sat, 21 Sep 2013 02:25:23 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=331458
Log:
Document the syntax when binding to an IPv6 address, since it wasn't very
obvious before.
Changed paths:
U phpdoc/en/trunk/language/context/socket.xml
Modified: phpdoc/en/trunk/language/context/socket.xml
===================================================================
--- phpdoc/en/trunk/language/context/socket.xml 2013-09-20 21:32:59 UTC (rev 331457)
+++ phpdoc/en/trunk/language/context/socket.xml 2013-09-21 02:25:23 UTC (rev 331458)
@@ -26,7 +26,8 @@
<para>
Used to specify the IP address (either IPv4 or IPv6) and/or the
port number that PHP will use to access the network. The syntax
- is <literal>ip:port</literal>.
+ is <literal>ip:port</literal> for IPv4 addresses, and
+ <literal>[ip]:port</literal> for IPv6 addresses.
Setting the IP or the port to <literal>0</literal> will let the system
choose the IP and/or port.
</para>
@@ -110,6 +111,15 @@
);
+// connect to the internet using the '2001:db8::1' IPv6 address
+// and port '7000'
+$opts = array(
+ 'socket' => array(
+ 'bindto' => '[2001:db8::1]:7000',
+ ),
+);
+
+
// connect to the internet using port '7000'
$opts = array(
'socket' => array(
--
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic