|
@@ -10,7 +10,8 @@ p=print
|
10
|
10
|
|
11
|
11
|
# class ChatConsumer(WebsocketConsumer,wsps.tasks_loop.AclTaskMixin,wsps.tasks_loop.AconMixin):
|
12
|
12
|
class ChatConsumer(AsyncWebsocketConsumer,wsps.tasks_loop.AclTaskMixin,wsps.tasks_loop.AconMixin):
|
13
|
|
- def connect(self):
|
|
13
|
+ # def connect(self):
|
|
14
|
+ async def ws_conn(self):
|
14
|
15
|
p("!!!!!!!!!!!!!!!!!!!!?")
|
15
|
16
|
print("",end="",flush=True)
|
16
|
17
|
# time.sleep(1.5)
|
|
@@ -19,10 +20,10 @@ class ChatConsumer(AsyncWebsocketConsumer,wsps.tasks_loop.AclTaskMixin,wsps.task
|
19
|
20
|
# print("",end="",flush=True)
|
20
|
21
|
self.accept()
|
21
|
22
|
|
22
|
|
- def disconnect(self, close_code):
|
|
23
|
+ async def ws_disconn(self, close_code):
|
23
|
24
|
pass
|
24
|
25
|
|
25
|
|
- def receive(self, text_data):
|
|
26
|
+ async def ws_rec(self, text_data):
|
26
|
27
|
p("text_data:",text_data)
|
27
|
28
|
print("",end="",flush=True)
|
28
|
29
|
text_data_json = json.loads(text_data)
|