public function open()
    {
        // Connect the socket.
        if (@!socket_connect($this->socket, $this->host, $this->port)) {
         Logger::get()->error(socket_strerror(socket_last_error()));
            throw new Exception('Socket connection error: ' . socket_strerror(socket_last_error()));
        }
    }