Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Swoole\WebSocket\FrameSwoole\WebSocket\Server::exist>
^SwooleLast updated: Mon, 26 Oct 2026

The Swoole\WebSocket\Server class

(PECL swoole >= 1.9.0)

Introduction

Class synopsis

class Swoole\WebSocket\Server extends Swoole\Http\Server {
/* Methods */
public function exist(int $fd): bool
public function on(string $event_name, callable $callback): ReturnType
public static function pack(
    string $data,
    string $opcode = ?,
    string $finish = ?,
    string $mask = ?
): binary
public function push(
    string $fd,
    string $data,
    string $opcode = ?,
    string $finish = ?
): void
public static function unpack(binary $data): string
/* Inherited methods */
public function Swoole\Http\Server::on(string $event_name, callable $callback): void
public function Swoole\Http\Server::start(): void
}

Table of Contents


<Swoole\WebSocket\FrameSwoole\WebSocket\Server::exist>
^SwooleLast updated: Mon, 26 Oct 2026