mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-10 01:05:42 +00:00
fix: remove unnecessary getaddrinfo and gethostbyname
This commit is contained in:
parent
7ba7bedd23
commit
7f13c3f5cf
1 changed files with 1 additions and 9 deletions
|
@ -168,15 +168,7 @@ class pyPlcTcpServerSocket():
|
|||
self.callbackStateNotification(1) # inform the higher level state machines, that TCP is listening
|
||||
self.addToTrace("pyPlcTcpSocket listening on port " + str(self.tcpPort))
|
||||
hostname=socket.gethostname()
|
||||
self.addToTrace(hostname)
|
||||
IPAddr=socket.gethostbyname(hostname)
|
||||
addressInfo = socket.getaddrinfo(hostname, None, socket.AF_INET6)
|
||||
#print("Your Computer Name is:"+hostname)
|
||||
self.addToTrace("The socket is linked the following IP addresses:")
|
||||
for i in range(0, len(addressInfo)):
|
||||
#fe80::4c46:fea5:b6c9:25a9
|
||||
IPv6Addr = addressInfo[i][4][0]
|
||||
self.addToTrace(IPv6Addr)
|
||||
self.addToTrace("Hostname is " + hostname)
|
||||
self.read_list = [self.ourSocket]
|
||||
self.rxData = []
|
||||
|
||||
|
|
Loading…
Reference in a new issue