21 lines
409 B
Python
21 lines
409 B
Python
|
#!/usr/bin/env python3
|
||
|
"""
|
||
|
Consumers available for the /quest websocket.
|
||
|
"""
|
||
|
from channels.generic.websocket import WebsocketConsumer
|
||
|
|
||
|
class QuestConsumer(WebsocketConsumer):
|
||
|
"""
|
||
|
The main consumer for /quest websockets.
|
||
|
"""
|
||
|
def connect(self):
|
||
|
self.accept()
|
||
|
self.send('message: connected')
|
||
|
|
||
|
def disconnect(self):
|
||
|
pass
|
||
|
|
||
|
def receive(self, text_data):
|
||
|
print(text_data)
|
||
|
self.send("message: lol}")
|