morozovsk\websocket\GenericEvent::accept PHP Method

accept() public method

public accept ( $listener, $connectionId, $address, $id )
    public function accept($listener, $connectionId, $address, $id)
    {
        $buffer = new \EventBufferEvent($this->base, $connectionId, \EventBufferEvent::OPT_CLOSE_ON_FREE);
        $buffer->setCallbacks(array($this, "onRead"), array($this, "onWrite"), array($this, "onError"), $connectionId);
        $buffer->enable(\Event::READ | \Event::WRITE | \Event::PERSIST);
        $this->clients[$connectionId] = $connectionId;
        $this->buffers[$connectionId] = $buffer;
        $this->_onOpen($connectionId);
    }