vncdotool icon indicating copy to clipboard operation
vncdotool copied to clipboard

Feature - Server Name

Open tinylama opened this issue 3 years ago • 1 comments

I can see we have in RFB server name, it would be great if we could return that.

I assume something like this would do it:

rfb.py:

    @property
    def get_name(self):
        return self.name

client.py:

    def get_server_name(self):
        """ Return server name as String 
        """
        return self.get_name.decode("utf-8", errors="ignore")

tinylama avatar Jan 18 '22 16:01 tinylama

This first part is not required as this is Python and not Java: No need to add that property as self.name can be accessed directly in client.py:

    def get_server_name(self) -> str:
        """ Return server name as String 
        """
        return self.name.decode("utf-8", errors="ignore")

Or not even that as you can can just use client.name.decode() in your code; as of Python 3.7 utf-8 is the default anyway.

pmhahn avatar Dec 20 '22 15:12 pmhahn