Closed mehaase closed 6 years ago
John approved this review, and Nathaniel likes this design too, so I think we all agree that this branch can be merged. However, this was branched from example_client_handle_close_v2
, so I can't merge it until we finalize #55.
Well, the intermediate PR could just be squashed if we could agree on addition here.
What I'd like to see:
Sure, I can rebase this PR, but since they both touch the example client it would take a few minutes and I'd rather hold off if we can the other PR figured out soon. I'll address your comments in that thread.
I mean no rebase needed, just make the incremental change here and use squash merge, and close the other PR.
Also I realized that heartbeat function can remain as is, just call with timeout inf.
This PR implements ping/pong behavior similar to aaugustin's websocket library. A call to
ping()
waits for a response with the same payload. (An exception is raised if the payload matches a ping that's already in flight.) A payload is randomly generated if omitted by the caller. Add a newpong()
method that can be used for sending an unsolicited pong.