Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout from ping #84

Open
nathanday opened this issue Jun 26, 2018 · 1 comment
Open

Timeout from ping #84

nathanday opened this issue Jun 26, 2018 · 1 comment

Comments

@nathanday
Copy link

We want to have a time out feature when we haven't received anything from the server including pongs from our pings, but I don't see how we can know when we get a pong response from our ping.
What am I missing, whats the point of us sending a ping if we can not handle the corresponding return pongs, the server sends its own pings to test if we still available?
It we be nice if we knew when the server sent us a ping as well as that tells us it still there as well.

@mistal-distal
Copy link

Ping/Pong delegate method unfortunately weren't implemented in this library.

So this lib does do ping/pong but it's at a lower level in the ProcessRawMessage function, meaning it's unusable from an application logic perspective.

Quick way around this is to come up with a language between the server and client, for example send three raw bytes /00/01/00, then catch this in the didReceiveData delegate and deal with it manually.

I understand this isn't optimal because you'd like to use the websocket ping/pong functionality but its a quick fix.

You could also modify the library to catch the ping/pongs and pass them up the queue.

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

No branches or pull requests

2 participants