ft_transcendence/frontend/consumers.py

16 lines
299 B
Python
Raw Normal View History

2023-11-22 09:50:42 -05:00
import json
from channels.generic.websocket import WebsocketConsumer
class ChatConsumer(WebsocketConsumer):
def connect(self):
self.accept()
self.send(text_data=json.dumps({
'type':'connection_established',
'message':'Your are now connected',
}))
def receive():
def disconnect():