« Swoole\Serialize::unpack
Swoole\Server::addlistener »

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
}

目次

関連キーワード:
Swoole   Server   connection   worker   server   callback   process   Send   task   swoole   socket   callable   port   after   timer   info   start   processes   addlistener   type   time   reactor   stats   user   Stop
関連する関数・ページ:
swoole-server.task   class.swoole-http-server   swoole-server.taskwait   swoole-server.sendmessage   swoole-server.stop   class.swoole-redis-server