Comments (8)
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.
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.
I'm testing here and no problems so far. Can you tell me what version are you using?
from java-android-websocket-client.
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.
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.
You have tested with https://pastebin.com/u0JFKBP9 ?
from java-android-websocket-client.
Yes, with the same code that you pasted there.
from java-android-websocket-client.
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)
- Connect to defined port with WSS : Trying to connect using local(private) IP HOT 1
- Messages longer than 65k are sent with wrong size HOT 2
- i get headers instead of my sending data HOT 1
- how to close socket connection pro grammatically HOT 1
- how i can check the socket connection is open or not HOT 3
- org.json.JSONException: No value for _version HOT 2
- Swoole WebSocket issue HOT 2
- duplicate class error HOT 1
- Doesn't work with node.js websocket HOT 2
- Websocket network binding HOT 1
- Use TLSv1.2 in Android 5 and 6 HOT 1
- how to set close connection res Code and description HOT 1
- Instant disconnect when using a websocket proxy (node-http-proxy) HOT 2
- SHA1 to SHA256
- Need use ExecutorService
- How to respond server ping with a pong ? HOT 2
- onCloseReceived() doesnt fire HOT 1
- Client sending messages multiple times.
- Connection issue to websocket server behind nginx reverse proxy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-android-websocket-client.