appendClientSocketAddress ($address = '', $key = 'parser' ) : object

参数

@param    string|array      $address    目标socket地址
@param    string            $key        目标服务器标识

说明

当连接目标 socket 服务器时,根据key追加客户端对应 socket 地址

举栗

$this->worker = new Downloader();
$this->worker->appendClientSocketAddress([
    'ws://127.0.0.1:5557',
    'ws://127.0.0.1:5558',
]);

results matching ""

    No results matching ""