Created
June 2, 2024 23:52
-
-
Save carstene1ns/e38fa10351449fee25cf2cc339c8e043 to your computer and use it in GitHub Desktop.
Wii U UDP logging server in python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
HOST, PORT = "0.0.0.0", 4405 | |
import socketserver | |
class WiiULogUDPHandler(socketserver.BaseRequestHandler): | |
def handle(self): | |
data = bytes.decode(self.request[0].strip()) | |
print(str(data)) | |
if __name__ == "__main__": | |
try: | |
server = socketserver.UDPServer((HOST,PORT), WiiULogUDPHandler) | |
server.serve_forever(poll_interval=0.5) | |
except (IOError, SystemExit): | |
raise | |
except KeyboardInterrupt: | |
print ("Crtl+C Pressed. Shutting down.") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment