note 105393 added to function.stream-socket-client
| From: | VasilRangelova dot k dot a dot boen_robot at osu1 dot php dot net | Date: | Sun, 14 Aug 2011 20:11:50 +0000 |
| Subject: | note 105393 added to function.stream-socket-client | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-182482@lists.php.net to get a copy of this message | ||
The remote_socket argument, in its end (well... after the port), can also contain a "/"
followed by a unique identifier. This is especially useful if you want to create multiple persistent
connections to the same transport://host:port combo.
Example:
<?php
$socket = stream_socket_client('tcp://mysql.example.com:3306/root', $errorno, $errorstr,
$timeout, STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT);
?>
Note that while (p)fsockopen() follows a similar scheme, it doesn't have this particular
feature.
----
Server IP: 69.147.83.197
Probable Submitter: 78.130.204.229
----
Manual Page -- http://www.php.net/manual/en/function.stream-socket-client.php
Edit -- https://master.php.net/note/edit/105393
Del: integrated -- https://master.php.net/note/delete/105393/integrated
Del: useless -- https://master.php.net/note/delete/105393/useless
Del: bad code -- https://master.php.net/note/delete/105393/bad+code
Del: spam -- https://master.php.net/note/delete/105393/spam
Del: non-english -- https://master.php.net/note/delete/105393/non-english
Del: in docs -- https://master.php.net/note/delete/105393/in+docs
Del: other reasons-- https://master.php.net/note/delete/105393
Reject -- https://master.php.net/note/reject/105393
Search -- https://master.php.net/manage/user-notes.php