2024 年日本 PHP 研討會

Swoole\Http\Server 類別

(PECL swoole >= 1.9.0)

簡介

類別概要

class Swoole\Http\Server extends Swoole\Server {
/* 方法 */
public on(字串 $event_name, 可呼叫 $callback): void
public start(): void
/* 繼承的方法 */
公開 Swoole\Server::addlistener(字串 $host, 整數 $port, 字串 $socket_type):
公開 Swoole\Server::after(整數 $after_time_ms, 可呼叫 $callback, 字串 $param = ?): ReturnType
swoole_timer_clear(整數 $timer_id):
公開 Swoole\Server::connection_info(整數 $fd, 整數 $reactor_id = ?): 陣列
公開 Swoole\Server::connection_list(int $start_fd, int $pagesize = ?): 陣列
公開 Swoole\Server\Port::on(字串 $event_name, 可呼叫的 $callback): ReturnType
公開 Swoole\Server::getClientInfo(整數 $fd, 整數 $reactor_id = ?, 布林值 $ignore_error = ?): 陣列
公開 Swoole\Server::getClientList(整數 $start_fd, 整數 $pagesize = ?): 陣列
公開 Swoole\Server::heartbeat(布林值 $if_close_connection): 混合
公開 Swoole\Server::listen(字串 $host, 整數 $port, 字串 $socket_type): 布林值
公開 Swoole\Server::on(字串 $event_name, 可呼叫 $callback):
公開 Swoole\Server::protect(整數 $fd, 布林 $is_protected = ?):
公開 Swoole\Server::send(整數 $fd, 字串 $data, 整數 $reactor_id = ?): 布林
公開 Swoole\Server::sendfile(整數 $fd, 字串 $filename, 整數 $offset = ?): 布林
公開 Swoole\Server::sendMessage(整數 $worker_id, 字串 $data): 布林
公開 Swoole\Server::sendto(
    字串 $ip,
    整數 $port,
    字串 $data,
    字串 $server_socket = ?
): 布林
公開 Swoole\Server::set(陣列 $settings): ReturnType
公開 Swoole\Server::stop(整數 $worker_id = ?): 布林值
公開 Swoole\Server::task(字串 $data, 整數 $dst_worker_id = ?, 可呼叫 $callback = ?): 混合
公開 Swoole\Server::taskwait(字串 $data, 浮點數 $timeout = ?, 整數 $worker_id = ?):
公開 Swoole\Server::taskWaitMulti(陣列 $tasks, 浮點數 $timeout_ms = ?):
公開 Swoole\Server::tick(整數 $interval_ms, 可呼叫 $callback):
}

目錄

新增註釋

使用者貢獻的註釋

此頁面沒有使用者貢獻的註釋。
To Top