Swoole
PHP Manual

The Swoole\Client class

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

Introduction

Class synopsis

Swoole\Client {
/* Constants */
const integer MSG_OOB = 1 ;
const integer MSG_PEEK = 2 ;
const integer MSG_DONTWAIT = 128 ;
const integer MSG_WAITALL = 64 ;
/* Properties */
public $errCode ;
public $sock ;
public $reuse ;
public $reuseCount ;
/* Methods */
public bool close ([ bool $force ] )
public bool connect ( string $host [, integer $port [, integer $timeout [, integer $flag ]]] )
public void __destruct ( void )
public array getpeername ( void )
public array getsockname ( void )
public bool isConnected ( void )
public void on ( string $event , callable $callback )
public void pause ( void )
public void pipe ( string $socket )
public void recv ([ string $size [, string $flag ]] )
public void resume ( void )
public integer send ( string $data [, string $flag ] )
public boolean sendfile ( string $filename [, int $offset ] )
public boolean sendto ( string $ip , integer $port , string $data )
public void set ( array $settings )
public void sleep ( void )
public void wakeup ( void )
}

Properties

errCode

sock

reuse

reuseCount

Predefined Constants

Swoole\Client::MSG_OOB

Swoole\Client::MSG_PEEK

Swoole\Client::MSG_DONTWAIT

Swoole\Client::MSG_WAITALL

Table of Contents


Swoole
PHP Manual