stream_socket_sendto
(PHP 5)
stream_socket_sendto — Sends a message to a socket, whether it is connected or not
Description
int stream_socket_sendto
( resource $socket
, string $data
[, int $flags
[, string $address
]] )
The value of flags
can be any combination
of the following:
possible values for flags
| STREAM_OOB |
Process OOB (out-of-band) data.
|
Example #1 stream_socket_sendto() Example
<?php
$socket = stream_socket_client('tcp://127.0.0.1:1234');
fwrite($socket, "Normal data transmit.");
stream_socket_sendto($socket, "Out of Band data.", STREAM_OOB);
fclose($socket);
?>
See also
stream_socket_recvfrom(),
stream_socket_client(), and
stream_socket_server().