socket_import_stream
(PHP 5 >= 5.4.0)
socket_import_stream — Import a stream
Описание
resource socket_import_stream
( resource
$stream
)Imports a stream that encapsulates a socket into a socket extension resource.
Список параметров
-
stream
-
The stream resource to import.
Возвращаемые значения
Returns FALSE
or NULL
on failure.
Примеры
Пример #1 socket_import_stream() example
<?php
$stream = stream_socket_server("udp://0.0.0.0:58380", $errno, $errstr, STREAM_SERVER_BIND);
$sock = socket_import_stream($stream);
?>
- socket_accept
- socket_bind
- socket_clear_error
- socket_close
- socket_cmsg_space
- socket_connect
- socket_create_listen
- socket_create_pair
- socket_create
- socket_get_option
- socket_getopt
- socket_getpeername
- socket_getsockname
- socket_import_stream
- socket_last_error
- socket_listen
- socket_read
- socket_recv
- socket_recvfrom
- socket_recvmsg
- socket_select
- socket_send
- socket_sendmsg
- socket_sendto
- socket_set_block
- socket_set_nonblock
- socket_set_option
- socket_setopt
- socket_shutdown
- socket_strerror
- socket_write
Коментарии
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