The Swoole\Server class

(PECL swoole >= 1.9.0)

简介

类摘要

class Swoole\Server {
/* 方法 */
public function addlistener(string $host, int $port, string $socket_type): void
public function addProcess(swoole_process $process): bool
public function after(int $after_time_ms, callable $callback, string $param = ?): ReturnType
public function bind(int $fd, int $uid): bool
public function clearTimer(int $timer_id): void
function swoole_timer_clear(int $timer_id): void
public function close(int $fd, bool $reset = ?): bool
public function confirm(int $fd): bool
public function connection_info(int $fd, int $reactor_id = ?): array
public function connection_list(int $start_fd, int $pagesize = ?): array
public function defer(callable $callback): void
public function exist(int $fd): bool
public function finish(string $data): void
public function getClientInfo(int $fd, int $reactor_id = ?, bool $ignore_error = ?): array
public function getClientList(int $start_fd, int $pagesize = ?): array
public function getLastError(): int
public function heartbeat(bool $if_close_connection): mixed
public function listen(string $host, int $port, string $socket_type): bool
public function on(string $event_name, callable $callback): void
public function pause(int $fd): void
public function protect(int $fd, bool $is_protected = ?): void
public function reload(): bool
public function resume(int $fd): void
public function send(int $fd, string $data, int $reactor_id = ?): bool
public function sendfile(int $fd, string $filename, int $offset = ?): bool
public function sendMessage(int $worker_id, string $data): bool
public function sendto(
    string $ip,
    int $port,
    string $data,
    string $server_socket = ?
): bool
public function sendwait(int $fd, string $data): bool
public function set(array $settings): ReturnType
public function shutdown(): void
public function start(): void
public function stats(): array
public function stop(int $worker_id = ?): bool
public function task(string $data, int $dst_worker_id = ?, callable $callback = ?): mixed
public function taskwait(string $data, float $timeout = ?, int $worker_id = ?): void
public function taskWaitMulti(array $tasks, float $timeout_ms = ?): void
public function tick(int $interval_ms, callable $callback): void
}

目录

添加备注

用户贡献的备注

此页面尚无用户贡献的备注。
To Top