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

Check connection activity #18

Closed
wants to merge 1 commit into from
Closed

Check connection activity #18

wants to merge 1 commit into from

Conversation

zerodivisi0n
Copy link
Contributor

Added sending pings if no activity on connection. If no response is received, connection is likely lost.

I found that the writing to SocketChannel succeeds even if the connection is broken. Even there is a bug in Android. It exists everywhere, including 4.1.

So the only way to determine the loss of connection is sending WebSocket pings. My solution is based on similar in Pusher Protocol.

@william-ferguson-au
Copy link
Contributor

Is there any plans to merge this change?
I think it might resolve #36

@Berglund
Copy link

Looks good to me.

@ghost
Copy link

ghost commented Apr 26, 2014

I am using pingpong mechanism in my project but the connection stable if the pingpong interval is less than 5 min, I tested with 6 min and more time interval but in that case after 2 or 3 pingpong there is no connection, i'am using 2.3.3 device for testing.

@ingcaratozzolo
Copy link

Are there news about this problem? The call to onClose is successful with a device with Android 4.4.2 kitkat; instead of a device with Android 5.0.1 lollipop the problem persists.

@oberstet
Copy link
Contributor

We have started basically a complete rewrite of AutobahnAndroid (incubated on branch https://github.com/crossbario/autobahn-java/tree/abjv2), so this PR/issue does not apply anymore.

The rewrite will add full support for both TLS and WAMPv2. It will run on both Android and plain Java 8 (client). The user API for WAMP will be based on CompletableFuture (no callback hell anymore).

@oberstet oberstet closed this May 14, 2017
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.

None yet

5 participants