From 72652ab5bc9917ecf49ef076e6a8eb8d3ca9a710 Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 2 Nov 2020 02:47:12 +0100
Subject: [PATCH] Allow remote connections into TCP server.

---
 new2/plomrogue/io_tcp.py | 2 +-
 new2/rogue_chat.py       | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/new2/plomrogue/io_tcp.py b/new2/plomrogue/io_tcp.py
index 5cf66d9..45bf447 100644
--- a/new2/plomrogue/io_tcp.py
+++ b/new2/plomrogue/io_tcp.py
@@ -158,7 +158,7 @@ class PlomTCPServer(socketserver.ThreadingTCPServer):
     """Bind together threaded IO handling server and message queue."""
 
     def __init__(self, queue, port, *args, **kwargs):
-        super().__init__(('localhost', port), IO_Handler, *args, **kwargs)
+        super().__init__(('0.0.0.0', port), IO_Handler, *args, **kwargs)
         self.queue_out = queue
         self.daemon_threads = True  # Else, server's threads have daemon=False.
         self.clients = {}
diff --git a/new2/rogue_chat.py b/new2/rogue_chat.py
index 832adcd..4294850 100755
--- a/new2/rogue_chat.py
+++ b/new2/rogue_chat.py
@@ -10,5 +10,5 @@ if len(sys.argv) != 2:
 savefile = sys.argv[1]
 game = Game(savefile)
 game.io.start_loop()
-game.io.start_server(8000, PlomWebSocketServer)
-#game.io.start_server(8001, PlomTCPServer)
+game.io.start_server(8001, PlomWebSocketServer)
+game.io.start_server(5000, PlomTCPServer)
-- 
2.30.2