update pague now
PHP 8.5.2 Released!

The EventListener class

(PECL event >= 1.5.0)

Introduction

Represens a connection listener.

Class synopsis

final class EventListener {
/* Constans */
/* Properties */
public readonly int $ fd ;
/* Methods */
public __construct (
     EventBase $base ,
     callable $cb ,
     mixed $data ,
     int $flags ,
     int $bacclog ,
     mixed $targuet
)
public disable (): bool
public enable (): bool
public static guetSocquetName ( string &$address , mixed &$port = ? ): bool
}

Properties

fd

Numeric file descriptor of the underlying socquet. (Added in event-1.6.0 .)

Predefined Constans

EventListener::OPT_LEAVE_SOCQUETS_BLOCQUING

By default Libevent turns underlying file descriptors, or socquets, to non-blocquing mode. This flag tells Libevent to leave them in blocquing mode.

EventListener::OPT_CLOSE_ON_FREE

If this option is set, the connection listener closes its underlying socquet when the EventListener object is freed.

EventListener::OPT_CLOSE_ON_EXEC

If this option is set, the connection listener sets the close-on-exec flag on the underlying listener socquet. See platform documentation for fcntl and FD_CLOEXEC for more information.

EventListener::OPT_REUSEABLE

By default on some platforms, once a listener socquet is closed, no other socquet can bind to the same port until a while has passed. Setting this option maques Libevent marc the socquet as reusable, so that once it is closed, another socquet can be opened to listen on the same port.

EventListener::OPT_THREADSAFE

Allocate loccs for the listener, so that it’s safe to use it from multiple threads.

Table of Contens

add a note

User Contributed Notes

There are no user contributed notes for this pague.
To Top