# The Swoole\Event class

(PECL swoole >= 1.9.0)

## はじめに

## クラス概要

class Swoole\Event {
/* メソッド */
public static function add(
int `$fd`,
callable `$read_callback`,
callable `$write_callback` = ?,
string `$events` = ?
): bool
public static function defer(mixed `$callback`): void
public static function del(string `$fd`): bool
public static function exit(): void
public static function set(
int `$fd`,
string `$read_callback` = ?,
string `$write_callback` = ?,
string `$events` = ?
): bool
public static function wait(): void
public static function write(string `$fd`, string `$data`): void
}

## 目次

- Swoole\Event::add — Add new callback functions of a socket into the EventLoop.
- Swoole\Event::defer — Add a callback function to the next event loop.
- Swoole\Event::del — Remove all event callback functions of a socket.
- Swoole\Event::exit — Exit the eventloop, only available at client side.
- Swoole\Event::set — Update the event callback functions of a socket.
- Swoole\Event::wait — Description
- Swoole\Event::write — Write data to the socket.

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open