PHPPM\Client::getConnection PHP Method

getConnection() protected method

protected getConnection ( ) : Connection
return React\Socket\Connection
    protected function getConnection()
    {
        if ($this->connection) {
            $this->connection->close();
            unset($this->connection);
        }
        $client = stream_socket_client($this->getControllerSocket());
        $this->connection = new Connection($client, $this->loop);
        return $this->connection;
    }