PHP Class Swoole\Client\Stream

Author: hantianfeng
Afficher le fichier Open project: matyhtf/swoole_framework Class Usage Examples

Méthodes publiques

Свойство Type Description
$connected boolean 是否已连接
$errCode
$errMsg

Protected Properties

Свойство Type Description
$fp
$tcp

Méthodes publiques

Méthode 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

Method Details

__construct() public méthode

public __construct ( $tcp = true )

close() public méthode

关闭socket连接
public close ( ) : boolean
Résultat boolean

connect() public méthode

public connect ( $host, $port, float $timeout = 0.1 ) : boolean
$host
$port
$timeout float
Résultat boolean

getSocket() public méthode

public getSocket ( ) : mixed
Résultat mixed

recv() public méthode

public recv ( ) : string
Résultat string

send() public méthode

发送数据
public send ( $content ) : integer
$content
Résultat integer

setTimeout() public méthode

public setTimeout ( float $timeout ) : boolean
$timeout float
Résultat boolean

Property Details

$connected public_oe property

是否已连接
public bool $connected
Résultat boolean

$errCode public_oe property

public $errCode

$errMsg public_oe property

public $errMsg

$fp protected_oe property

protected $fp

$tcp protected_oe property

protected $tcp