Bläddra i källkod

renamed welcome_client to on_welcome

digital 7 år sedan
förälder
incheckning
a71f7220df
1 ändrade filer med 6 tillägg och 7 borttagningar
  1. 6 7
      network/__init__.py

+ 6 - 7
network/__init__.py

@@ -138,6 +138,12 @@ class ConnHandler(object):
     async def handle(self, data):
         return
 
+    async def on_welcome(self):
+        """
+        This method can be used to send a welcome message to the client.
+        """
+        self.send("Welcome client, this is the server sending!")
+
     async def recv(self):
         """
         This method waits for the client to send something, decodes it and
@@ -164,13 +170,6 @@ class ConnHandler(object):
             lserver.error(e, exc_info=True)
             return False
 
-    async def welcome_client(self):
-        """
-        This method can be used to send a welcome message to the client.
-        """
-        self.send("Welcome client, this is the server sending!")
-        pass
-
 
 class ConnHandlerEcho(ConnHandler):
     """