You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
maybe the answer of my question is obvious but i'm new with asyncio and there is something i dont understand. I'm using your module to make a websocket "proxy". So i have one coroutine "server" and one "client" which is connect to another websocket server. Unfortunately, this server close the connection after one hour without sending any event. So i want to pong when this server send a ping but i dont know how to catch this. I found https://websockets.readthedocs.org/en/latest/_modules/websockets/protocol.html#WebSocketCommonProtocol.pong but this is to send a pong. Did i miss a coroutine like websocket.pong.recv() to catch a ping request and respond with the good data ? Thanks in advance for your answer
The text was updated successfully, but these errors were encountered:
I'm not entirely sure this answers your question. If you were asking "how can I propagate a ping I receive on my server side to my client side, so than when the downstream client pings me I ping the upstream server ?" there is no good API for that. I would recommend to decouple both sides and to run an asyncio task to ping the upstream server regularly.
Hi, thanks for your answer. "I would recommend to decouple both sides and to run an asyncio task to ping the upstream server regularly" This is exactly what i did. For my client side i thought i had to handle the ping requests from the server, but you answerd me that was made automatically. Well, so i dont know why my client is disconnecting after one hour. Thanks again
Hi there,
maybe the answer of my question is obvious but i'm new with asyncio and there is something i dont understand. I'm using your module to make a websocket "proxy". So i have one coroutine "server" and one "client" which is connect to another websocket server. Unfortunately, this server close the connection after one hour without sending any event. So i want to pong when this server send a ping but i dont know how to catch this. I found https://websockets.readthedocs.org/en/latest/_modules/websockets/protocol.html#WebSocketCommonProtocol.pong but this is to send a pong. Did i miss a coroutine like websocket.pong.recv() to catch a ping request and respond with the good data ? Thanks in advance for your answer
The text was updated successfully, but these errors were encountered: