mirror of https://github.com/dirtbags/moth.git
Change port to 6667, bind to all IPs
This commit is contained in:
parent
530a209082
commit
3fc8fcbd3f
|
@ -20,7 +20,7 @@ def main():
|
||||||
req = points.encode_request(now, cat, team, score)
|
req = points.encode_request(now, cat, team, score)
|
||||||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||||
while True:
|
while True:
|
||||||
s.sendto(req, (opts.host, 9999))
|
s.sendto(req, (opts.host, 6667))
|
||||||
r, w, x = select.select([s], [], [], 0.2)
|
r, w, x = select.select([s], [], [], 0.2)
|
||||||
if r:
|
if r:
|
||||||
b = s.recv(500)
|
b = s.recv(500)
|
||||||
|
|
|
@ -39,6 +39,5 @@ class MyHandler(socketserver.BaseRequestHandler):
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
HOST, PORT = "localhost", 9999
|
server = socketserver.UDPServer(('', 6667), MyHandler)
|
||||||
server = socketserver.UDPServer((HOST, PORT), MyHandler)
|
|
||||||
server.serve_forever()
|
server.serve_forever()
|
||||||
|
|
Loading…
Reference in New Issue