← All built-ins / stream_send()
stream_send()
stream_send(...$args): int
Parameters
| Name | Type | Description |
|---|---|---|
| $sock | resource | socket handle |
| $data | string | bytes to send |
Return value
Number of bytes sent.
Example
echo "used in registry/server.hphp and lib/websocket.hphp";
used in registry/server.hphp and lib/websocket.hphp
This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.