--- a/src/eric7/RemoteServerInterface/EricServerInterface.py Tue May 21 17:29:42 2024 +0200 +++ b/src/eric7/RemoteServerInterface/EricServerInterface.py Tue May 21 19:31:08 2024 +0200 @@ -240,6 +240,19 @@ self.__connection = None self.__callbacks.clear() + def getHost(self): + """ + Public method to get the connected host as "host name:port". + + @return connected host as "host name:port" or an empty string, if there is no + valid connection + @rtype str + """ + if self.isServerConnected(): + return f"{self.__connection.peerName()}:{self.__connection.peerPort()}" + else: + return "" + ####################################################################### ## Methods for sending requests and receiving the replies. #######################################################################