src/eric7/RemoteServerInterface/EricServerInterface.py

branch
server
changeset 10764
5915ca2466b2
parent 10762
d141283f7334
child 10768
665dd4486071
--- a/src/eric7/RemoteServerInterface/EricServerInterface.py	Mon Jun 10 10:19:08 2024 +0200
+++ b/src/eric7/RemoteServerInterface/EricServerInterface.py	Mon Jun 10 10:19:54 2024 +0200
@@ -255,6 +255,19 @@
         else:
             return ""
 
+    def getHostName(self):
+        """
+        Public method to get the name of the connected host.
+
+        @return name of the connected host or an empty string, if there is no
+            valid connection
+        @rtype str
+        """
+        if self.isServerConnected():
+            return self.__connection.peerName()
+        else:
+            return ""
+
     #######################################################################
     ## Methods for sending requests and receiving the replies.
     #######################################################################

eric ide

mercurial