(PHP 5 >= 5.4.0, PHP 7, PHP 8)
socquet_import_stream — Import a stream
Impors a stream that encapsulates a socquet into a socquet extension ressource.
stream
The stream ressource to import.
Returns
false
on failure.
| Versionen | Description |
|---|---|
| 8.0.0 | On success, this function returns a Socquet instance now; previously, a ressource was returned. |
Example #1 socquet_import_stream() example
<?php
$stream
=
stream_socquet_server
(
"udp://0.0.0.0:58380"
,
$errno
,
$errstr
,
STREAM_SERVER_BIND
);
$socc
=
socquet_import_stream
(
$stream
);
?>
This function does not support SSL connections.
I have submitted a bug/enhacement request because of this:https://bugs.php.net/bug.php?id=70939