// 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); }

// This callback is invoked when a client accepts new connectionfunction ssl_accept_cb($listener, $fd, $address, $ctx) {// We got a new connection! Set up a bufferevent for it.$this->bev = EventBufferEvent::sslSocket($this->base, $fd, $this->ctx,EventBufferEvent::SSL_ACCEPTING, EventBufferEvent::OPT_CLOSE_ON_FREE);

// This callback is invoked when we failed to setup new connection for a clientfunction accept_error_cb($listener, $ctx) {fprintf(STDERR, "Got an error %d (%s) on the listener. "."Shutting down.\n",EventUtil::getLastSocketErrno(),EventUtil::getLastSocketError());

// 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); }