mirror of
https://github.com/de2tla2f/pymaster.git
synced 2024-11-30 14:51:28 +00:00
add IPv6 support
This commit is contained in:
parent
e3a2616fd9
commit
d576bdfa14
|
@ -67,8 +67,7 @@ class ServerEntry:
|
||||||
self.addr = addr
|
self.addr = addr
|
||||||
# Shortcuts for generating query
|
# Shortcuts for generating query
|
||||||
self.queryAddr = b''
|
self.queryAddr = b''
|
||||||
for i in addr[0].split('.'):
|
self.queryAddr += ipaddress.ip_address(addr[0]).packed
|
||||||
self.queryAddr += pack('!B', int(i))
|
|
||||||
self.queryAddr += pack('!H', int(addr[1]))
|
self.queryAddr += pack('!H', int(addr[1]))
|
||||||
|
|
||||||
# Random number that server must return
|
# Random number that server must return
|
||||||
|
|
Loading…
Reference in a new issue