Property | Type | Description | |
---|---|---|---|
$connected | |||
$try_reconnect | 是否重新连接 |
Method | Description | |
---|---|---|
close ( ) | 关闭socket连接 | |
connect ( string $host, integer $port, float $timeout = 0.1, $nonblock = false ) : boolean | 连接到服务器 接受一个浮点型数字作为超时,整数部分作为sec,小数部分*100万作为usec | |
isConnected ( ) : boolean | 是否连接到服务器 | |
recv ( integer $length = 65535, boolean $waitall = false ) : string | boolean | 接收数据 | |
send ( string $data ) : boolean | integer | 发送数据 |