PHPTS:一键免费搭建 Nginx + PHP + MySQL 运行环境

Swoole\Client::sendto

(PHP 5 >= 5.2.0, PHP 7, PECL swoole >= 1.9.0)

Swoole\Client::sendtoSend data to the remote UDP address.

说明

public Swoole\Client::sendto ( string $ip , integer $port , string $data ) : boolean

The swoole client should be type of SWOOLE_SOCK_UDP or SWOOLE_SOCK_UDP6.

参数

ip

The IP address of remote host, IPv4 or IPv6.

port

The port number of remote host.

data

The data to send which should be less-than 64K.

返回值