Daphne ping pong #496
-
Hi, sorry for the noobie question. |
Beta Was this translation helpful? Give feedback.
Answered by
carltongibson
Jan 23, 2024
Replies: 1 comment 1 reply
-
Hi. I assuming you're using something like the class PingConsumer(AsyncConsumer):
async def websocket_connect(self, message):
await self.send({
"type": "websocket.accept",
})
async def websocket_receive(self, message):
await asyncio.sleep(1)
await self.send({
"type": "websocket.send",
"text": "pong",
}) If so, you can add some logging (or print output even) to |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Producks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi.
I assuming you're using something like the
PingConsumer
from the Channels docs...If so, you can add some logging (or print output even) to
websocket_receive
to show the events in action.