Parcourir la source

Boxes example, tcp-proxy cleanup when a module.

Steve Thielemann il y a 6 ans
Parent
commit
6a3d91590f
2 fichiers modifiés avec 8 ajouts et 4 suppressions
  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)