Skip to content

Conversation

@mrigaya
Copy link

@mrigaya mrigaya commented Mar 6, 2018

As per https://tools.ietf.org/html/rfc6455#section-5.5.2 definition, A Ping frame MAY include "Application data".

In nopoll when PING frame is recieved with payload, it responds with PONG frame having same payload. In case if the user/client is interested in the payload/application data it received with PING, then there is no option for the client to get that payload.

If we have ping handler similar to msg handler then it will be useful/easier for the client to get that payload. And based on the ping handler, client can set the timer in their application to detect any timeout or pings not received over the connection for certain amount of time due to some network issue, then client can close the connection completely and retry again with new server.

Review these changes and Please let me know if it requires any modification/suggestion from your end.

@softins
Copy link
Contributor

softins commented Mar 6, 2018

It would be useful also to call conn->on_ping_msg before sending the pong when there is no payload, in case the application just needs to know that a ping was received, but there is no need for data. Around line 3458.

@francisbrosnan
Copy link
Member

Dear @mrigaya
Thanks for your time and the patch. The idea looks good to me. @softins's idea too. I'll review all this asap.
Best Regards.

@mrigaya
Copy link
Author

mrigaya commented Jun 8, 2018

@francisbrosnan Any suggestion on this pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants