The Swoole\Client class

Introduction

Class synopsis

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

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