protected function getConnectionForClientSocket($socket): ?Connection
    {
        if (!isset($this->connections[$this->resourceId($socket)])) {
            return null;
        }
        return $this->connections[$this->resourceId($socket)];
    }
protected function getConnectionForClientSocket($socket): ?Connection
    {
        if (!isset($this->connections[$this->resourceId($socket)])) {
            return null;
        }
        return $this->connections[$this->resourceId($socket)];
    }
protected function getConnectionForClientSocket ( $ socket ) : ? Connection { if ( ! isset ( $ this -> connections [ $ this -> resourceId ( $ socket ) ] ) ) { return null ; } return $ this -> connections [ $ this -> resourceId ( $ socket ) ] ; }
Returns the Connection associated with the specified socket resource

@param resource $socket
@return Connection
Returns the Connection associated with the specified socket resource