test for ws
This commit is contained in:
11
api/ws.py
Normal file
11
api/ws.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from channels.generic.websocket import AsyncWebsocketConsumer
|
||||
|
||||
class Consumer(AsyncWebsocketConsumer):
|
||||
async def connect(self):
|
||||
await self.accept()
|
||||
|
||||
async def disconnect(self):
|
||||
pass
|
||||
|
||||
async def receive(self, text_data):
|
||||
await self.send(text_data=text_data)
|
||||
Reference in New Issue
Block a user