Controls the maximum number of pending connections that the network
stack should allow to wait in a not-yet-accepted state at any time; see
documentation for your system’s
listen
function for more details. If
backlog
is negative, Libevent tries to pick a good value for the
backlog
; if it is zero, Event assumes that
listen
is already called on the socket(
target
)

target

May be string, socket resource, or a stream associated with a socket. In
case if
target
is a string, the string will be parsed as network address. It will be
interpreted as a UNIX domain socket path, if prefixed with
'unix:'
, e.g.
'unix:/tmp/my.sock'
.

// This callback is invoked when there is data to read on $bevpublic function acceptConnCallback($listener, $fd, $address, $ctx) {// We got a new connection! Set up a bufferevent for it. */$base = $this->base;$this->conn[] = new MyListenerConnection($base, $fd); }