You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, I am writing this question just for curiosity.
So, I am using Socket.IO in one of my projects (Android App), and we have to start and keep the socket connection alive on shallow networks (ex: 30-40kbps). I have observed that Socket.IO connection is not guaranteed in such networks, sometimes it connects and sometimes it does not.
So from a POC point of view, I have tried native WebSocket from OKHTTP to observe the behaviour and it turned out to be the same in terms of connection. However, I have observed the WebSocket connections were established slightly faster than socket.io.
For example, Socket.IO is taking approximately 13-15 seconds to start the connection in a 40kbps network and on the other hand, WebSocket was able to start the connection in 10-12 seconds. similarly, in every network, the WebSocket connection was slightly faster than socket.io.
2-3 seconds faster connection time might not be much for everyone but it certainly is for my use-case.
I am curious that if socket.io is built on top of WebSocket then why is it taking more time to establish the connection?
and is there any way I can improve the connection performance in Socket.IO to match WebSocket?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, I am writing this question just for curiosity.
So, I am using Socket.IO in one of my projects (Android App), and we have to start and keep the socket connection alive on shallow networks (ex: 30-40kbps). I have observed that Socket.IO connection is not guaranteed in such networks, sometimes it connects and sometimes it does not.
So from a POC point of view, I have tried native WebSocket from OKHTTP to observe the behaviour and it turned out to be the same in terms of connection. However, I have observed the WebSocket connections were established slightly faster than socket.io.
For example, Socket.IO is taking approximately 13-15 seconds to start the connection in a 40kbps network and on the other hand, WebSocket was able to start the connection in 10-12 seconds. similarly, in every network, the WebSocket connection was slightly faster than socket.io.
2-3 seconds faster connection time might not be much for everyone but it certainly is for my use-case.
I am curious that if socket.io is built on top of WebSocket then why is it taking more time to establish the connection?
and is there any way I can improve the connection performance in Socket.IO to match WebSocket?
Beta Was this translation helpful? Give feedback.
All reactions