PHP Conference Japan 2024

Swoole\Http\Server 类

(PECL swoole >= 1.9.0)

简介

类概要

class Swoole\Http\Server extends Swoole\Server {
/* 方法 */
public on(string $event_name, callable $callback): void
public start(): void
/* 继承的方法 */
public Swoole\Server::addlistener(string $host, int $port, string $socket_type): void
public Swoole\Server::after(int $after_time_ms, callable $callback, string $param = ?): ReturnType
public Swoole\Server::bind(int $fd, int $uid): bool
swoole_timer_clear(int $timer_id): void
public Swoole\Server::close(int $fd, bool $reset = ?): bool
public Swoole\Server::connection_info(int $fd, int $reactor_id = ?): array
public Swoole\Server::connection_list(int $start_fd, int $pagesize = ?): array
public Swoole\Server\Port::on(string $event_name, callable $callback): ReturnType
public Swoole\Server::getClientInfo(int $fd, int $reactor_id = ?, bool $ignore_error = ?): array
public Swoole\Server::getClientList(int $start_fd, int $pagesize = ?): array
public Swoole\Server::heartbeat(bool $if_close_connection): mixed
public Swoole\Server::listen(字符串 $host, 整数 $port, 字符串 $socket_type): 布尔值
public Swoole\Server::on(字符串 $event_name, 可调用 $callback):
public Swoole\Server::protect(整数 $fd, 布尔值 $is_protected = ?):
public Swoole\Server::send(整数 $fd, 字符串 $data, 整数 $reactor_id = ?): 布尔值
public Swoole\Server::sendfile(整数 $fd, 字符串 $filename, 整数 $offset = ?): 布尔值
public Swoole\Server::sendto(
    字符串 $ip,
    整数 $port,
    字符串 $data,
    字符串 $server_socket = ?
): 布尔值
public Swoole\Server::set(数组 $settings): ReturnType
public Swoole\Server::stop(整数 $worker_id = ?): 布尔值
public Swoole\Server::task(字符串 $data, 整数 $dst_worker_id = ?, 可调用 $callback = ?): 混合类型
public Swoole\Server::taskwait(字符串 $data, 浮点数 $timeout = ?, 整数 $worker_id = ?):
public Swoole\Server::taskWaitMulti(数组 $tasks, 浮点数 $timeout_ms = ?):
public Swoole\Server::tick(整数 $interval_ms, 可调用 $callback):
}

目录

添加注释

用户贡献的注释

此页面没有用户贡献的注释。
To Top