|
stream_socket_serverCreate an Internet or Unix domain server socket Description
resource stream_socket_server
( string
$local_socket
[, int &$errno
[, string &$errstr
[, int $flags = STREAM_SERVER_BIND | STREAM_SERVER_LISTEN
[, resource $context
]]]] )
Creates a stream or datagram socket on the specified
This function only creates a socket, to begin accepting connections use stream_socket_accept. Parameters
Return Values
Returns the created stream, or Examples
Example #1 Using TCP server sockets
<?php The example below shows how to act as a time server which can respond to time queries as shown in an example on stream_socket_client.
Example #2 Using UDP server sockets
<?php Notes
See Also
|