public function createConnection($host, $port, $password = null)
    {
        $socket = $this->socketFactory->createClient(sprintf('%s:%s', $host, $port));

        $conn = new Connection($socket);

        if (!empty($password)) {
            $conn->authenticate($password);
        }

        return $conn;
    }