瀏覽代碼

Boxes example, tcp-proxy cleanup when a module.

Steve Thielemann 5 年之前
父節點
當前提交
6a3d91590f
共有 2 個文件被更改,包括 8 次插入4 次删除
  1. 3 0
      boxes.py
  2. 5 4
      tcp-proxy.py

+ 3 - 0
boxes.py

@@ -150,6 +150,9 @@ class Boxes(object):
         """
         """
         Display alert message
         Display alert message
 
 
+        Example:
+        self.queue_game.put(Boxes.alert("Proxy done.", base="green"))
+
         length: the printable character length.
         length: the printable character length.
             If the string contains color codes, you'll need
             If the string contains color codes, you'll need
             to use this so it will be centered properly.
             to use this so it will be centered properly.

+ 5 - 4
tcp-proxy.py

@@ -581,8 +581,9 @@ if __name__ == "__main__":
 else:
 else:
     # I can't seem to get twistd -y tcp-proxy.py
     # I can't seem to get twistd -y tcp-proxy.py
     # to work.  Missing imports?
     # to work.  Missing imports?
-    application = service.Application("TradeWarsGameServer-Proxy")
-    factory = protocol.Factory()
-    factory.protocol = Player
-    internet.TCPServer(config["listen_port"], factory).setServiceParent(application)
+    pass
+    # application = service.Application("TradeWarsGameServer-Proxy")
+    # factory = protocol.Factory()
+    # factory.protocol = Player
+    # internet.TCPServer(config["listen_port"], factory).setServiceParent(application)