Open grubberr opened 10 years ago
Hi,
2014-09-30 8:08 GMT+02:00 grubberr notifications@github.com:
Hello,
I am curious why in Heartbeat context manager you send PongControlMessage ?
https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/websocket.py#L55
for me more logically to send PingControlMessage ?
Thanks in advance!
I think I always considered the heartbeat to be a receiver of Ping messages but you have a point actually. Mind you, these days the class is still there but not uactually used anyhow. Well, unless you directly create a WebSocket instance yourself and call its run method. This is not used by any of the server/client in ws4py anylonger.
reading some simple articles about websocket I initially also thought that websocket library has to re-connect using some ping-pong heartbeat
maybe re-implementing this Hearbeat class for receiving pings really good point
anyway in my code I have own heartbeat thread which checks if connection alive using incoming data and I want to re-implement based on incoming ping messages
but I am stuck on such thing:
I cannot find method which will be executed if ping message arive
I only need to patch ws4py
I think I ought to implement a "pinged()" handler indeed.
Hi,
We're using ws4py and need finer grained control over ping/pong handling. We really could use a 'pong_received' event handler and a method to manually trigger the sending of a ping message. This, in addition to regular periodic ping requests being automatically generated by ws4py.
that is, we need to know when the remote end has responded to our ping request, to manually initiate a ping request and to have a regular ping request sent.
bonus if we also could have a ping_received event as well.
thanks
Hello,
I am curious why in Heartbeat context manager you send PongControlMessage ?
https://github.com/Lawouach/WebSocket-for-Python/blob/master/ws4py/websocket.py#L55
for me more logically to send PingControlMessage ?
Thanks in advance!