src/ResourceSocket.php
protected function addReadListener() {
        if($this->readable && !$this->listeningRead) {
            if(!\is_resource($this->socket)) {
                $this->emit('error', array((new \RuntimeException('Unable to add closed (shutdown) socket to event loop'))));
                $this->close();
                return;
            }
            
            $this->loop->addReadStream($this->socket, array($this, 'handleData'));
            $this->listeningRead = true;
        }
    }
protected function addReadListener() {
        if($this->readable && !$this->listeningRead) {
            if(!\is_resource($this->socket)) {
                $this->emit('error', array((new \RuntimeException('Unable to add closed (shutdown) socket to event loop'))));
                $this->close();
                return;
            }
            
            $this->loop->addReadStream($this->socket, array($this, 'handleData'));
            $this->listeningRead = true;
        }
    }
Adds the read listener.
@return void
@internal