Swoole Swoole\Event 클래스
(PECL swoole >= 1.9.0)
소개
클래스 개요
class Swoole\Event {
/* Methods */
public static add(
int $fd,
callable $read_callback,
callable $write_callback = ?,
string $events = ?
): bool
public static defer(mixed $callback): void
public static del(string $fd): bool
public static exit(): void
public static set(
int $fd,
string $read_callback = ?,
string $write_callback = ?,
string $events = ?
): bool
public static wait(): void
public static write(string $fd, string $data): void
}
목차
- Swoole\Event::add — 소켓의 새로운 콜백 함수를 EventLoop에 추가합니다.
- Swoole\Event::defer — 다음 이벤트 루프에 콜백 함수를 추가합니다.
- Swoole\Event::del — 소켓의 모든 이벤트 콜백 함수를 제거합니다.
- Swoole\Event::exit — 클라이언트 측에서만 사용할 수 있는 이벤트 루프를 종료합니다.
- Swoole\Event::set — 소켓의 이벤트 콜백 함수를 업데이트합니다.
- Swoole\Event::wait — 명
- Swoole\Event::write — 소켓에 데이터를 씁니다.