(PECL swoole >= 1.9.0)
The Swoole extension provides low-level interfaces to directly manipulate the underlying epoll/kqueue/poll/select event loop. It allows adding sockets created by other extensions or PHP's stream/socket extensions to Swoole's EventLoop.
注意: The Event module is low-level, being a basic encapsulation of epoll. Users should have experience with IO multiplexing programming.
fd
int
stream resource
resource
socket resource
resource
object
object
$sock,$read_callback,$write_callback = ?,$flags = ?$fd, int $events
=
SWOOLE_EVENT_READ | SWOOLE_EVENT_WRITE
): bool