Closed dmugtasimov closed 5 years ago
hi @dmugtasimov i thought i had that covered already. see https://github.com/noisyboiler/wampy/blob/master/wampy/transports/websocket/frames.py#L306
Is there a bug to report? Or do you want this exposed to be used other than by wampy
internals?
thanks
No, it is not a bug report, rather a feature request. Now it is implemented to pong a ping from Crossbar. I would like also to be able to send ping from client to crossbar. And have a handler for received pong. This is needed to check if crossbar is still available (connection alive)
Ok. So would a configurable websocket Ping interval be what you are after? And whatever wampy
client you instantiate would Ping the router at these intervals?
I see it like I have method on wampy
client which I call whenever I want and it sends ping and I have a decorator to mark a handler for pong. I this case it is up to wampy
user to ping in intervals or on demand. Also pong timeout is up to wampy
user to validate in handler (or outside of it).
are you being disconnected from a Router then? if so, wampy
does return a Pong
if a Router pings you... maybe it just needs to be configured to do so?
Or if you're not being disconnected, I'm curious as to why you'd like this.
We could do it, but it needs some thought. wampy
only has public APIs to send WAMP
messages (no big surprise there) and exposing the websocket messages to the user is going to break the design.
@dmugtasimov i gave it a go tonight: https://github.com/noisyboiler/wampy/pull/86
in master.
I mean WebSockets ping