Skip to content

Conversation

@glukacsy
Copy link

Hi,

This is the same as my previous pull request, but now I added integration tests.

I added unsolicited pong support to Casablanca (see https://tools.ietf.org/html/rfc6455#section-5.5.3). This is useful for cases when the client wants to check whether the websocket connection is still up and running. For example, if I unplug my network cable, without this change, Casablanca simply does not notice that the Websocket connection is down, the close handler won't get invoked etc.

With these changes, the client can send (periodically or when certain events happen, e.g. network change events) an unsolicited pong request which has no effect on a healthy websocket connection, but will help Casablanca/WebSocket++ detect that the connection has been lost. With these changes, if I unplug my network cable and if I send a pong message after that, Casablanca correctly invokes the websocket close handler within a few seconds.

Regards,
Gergely

@msftclas
Copy link

Hi @glukacsy, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by Microsoft and real humans are currently evaluating your PR.

TTYL, MSBOT;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests will fail on WinRT since our WinRT websocket implementation does not support ping/pong messages. We should disable these tests on winrt (#if !defined(__cplusplus_winrt)).
Alternatively, I can also disable these tests for WinRT once we accept the PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am happy adding the ifdef myself, but I am also happy if you do that :) Let me know how you want me to proceed.

@kavyako
Copy link
Contributor

kavyako commented Dec 2, 2015

This has been merged to development branch. I disabled the API on WinRT.

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