Property | Type | Description | |
---|---|---|---|
$connected | boolean | 是否已连接 | |
$errCode | |||
$errMsg |
Property | Type | Description | |
---|---|---|---|
$fp | |||
$tcp |
Method | Description | |
---|---|---|
__construct ( $tcp = true ) | ||
close ( ) : boolean | 关闭socket连接 | |
connect ( $host, $port, float $timeout = 0.1 ) : boolean | ||
getSocket ( ) : mixed | ||
recv ( ) : string | ||
send ( $content ) : integer | 发送数据 | |
setTimeout ( float $timeout ) : boolean |
public setTimeout ( float $timeout ) : boolean | ||
$timeout | float | |
return | boolean |