Code Monkey home page Code Monkey logo

Comments (8)

gusavila92 avatar gusavila92 commented on June 2, 2024

Hi!
Could you please tell me how are you testing this library? Is the library being executed within a mobile or desktop device? Which WebSocket version is your server running? Who decides to close the connection, your client or your server?

from java-android-websocket-client.

lgbm avatar lgbm commented on June 2, 2024

ws://echo.websocket.org
Desktop, Java SE
I guess with idle connection, but your library try to reconnect after 60s (read timeout)

from java-android-websocket-client.

gusavila92 avatar gusavila92 commented on June 2, 2024

I'm testing here and no problems so far. Can you tell me what version are you using?

from java-android-websocket-client.

lgbm avatar lgbm commented on June 2, 2024

java-android-websocket-client version? Last.
java version? jdk1.8.0_131

Please, check out this: https://pastebin.com/u0JFKBP9
The "Unexpected end of stream" exception occur after some minutes (totally random)

Logs:

2017-12-21T13:43:02.947: onOpen
2017-12-21T13:43:03.346: onTextReceived
2017-12-21T13:43:05.948: onTextReceived
2017-12-21T13:43:08.182: onTextReceived
2017-12-21T13:43:11.283: onTextReceived
............
2017-12-21T13:52:56.235: onTextReceived
2017-12-21T13:53:00.766: onTextReceived
2017-12-21T13:53:02.947: Unexpected end of stream

from java-android-websocket-client.

gusavila92 avatar gusavila92 commented on June 2, 2024

I tested the library in my computer connecting to your server and everything is working fine. I managed to receive JSON text for 10 minutes or more without getting the "Unexpected end of stream". I recommend you to check any proxies or routers in between that could be killing the connection, because some of them kill long standing connections even if those connections are receiving data.

P.D. You should implement some kind of authentication technique, because anyone can watch your server data.

from java-android-websocket-client.

lgbm avatar lgbm commented on June 2, 2024

You have tested with https://pastebin.com/u0JFKBP9 ?

from java-android-websocket-client.

gusavila92 avatar gusavila92 commented on June 2, 2024

Yes, with the same code that you pasted there.

from java-android-websocket-client.

lgbm avatar lgbm commented on June 2, 2024

I suppose, the server side kill the connection due idle connection or something else.
Always 10 min each, a lot of coincidence for nothing.

My connection is directly, no proxies, no bridges, no firewall or AV intromissions.

Thank you for support.

from java-android-websocket-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.