src/eric7/RemoteServerInterface/EricServerInterface.py

branch
server
changeset 10723
88bec462b855
parent 10630
552a790fd9bc
child 10762
d141283f7334
equal deleted inserted replaced
10722:b74d46513011 10723:88bec462b855
237 self.__connection.close() 237 self.__connection.close()
238 238
239 self.connectionStateChanged.emit(False) 239 self.connectionStateChanged.emit(False)
240 self.__connection = None 240 self.__connection = None
241 self.__callbacks.clear() 241 self.__callbacks.clear()
242
243 def getHost(self):
244 """
245 Public method to get the connected host as "host name:port".
246
247 @return connected host as "host name:port" or an empty string, if there is no
248 valid connection
249 @rtype str
250 """
251 if self.isServerConnected():
252 return f"{self.__connection.peerName()}:{self.__connection.peerPort()}"
253 else:
254 return ""
242 255
243 ####################################################################### 256 #######################################################################
244 ## Methods for sending requests and receiving the replies. 257 ## Methods for sending requests and receiving the replies.
245 ####################################################################### 258 #######################################################################
246 259

eric ide

mercurial