Swoole\Client::sendto
PHP function
Edit on GitHub ✎
(PECL swoole >= 1.9.0)
Send data to the remote UDP address.
Description
Swoole\Client::sendto(string $ip, int $port, string $data): bool
The swoole client should be type of SWOOLE_SOCK_UDP or SWOOLE_SOCK_UDP6.
Parameters
ipThe IP address of remote host, IPv4 or IPv6.
portThe port number of remote host.
dataThe data to send which should be less-than 64K.