Socket.io has connection and disconnect events.
Does socket.io has timeout event for client sockets, that are already connected?
https://github.com/socketio/socket.io
Related
Socket disconnect and reconnect with new socket id.
How to handle it from server side.
Is there possibility server configuration not match with socket.io
Socket disconnect and reconnect with new socket id.
How to handle it from server side.
Is there possibility server configuration not match with socket.
We are using STOMP over WebSockets (ref) into ActiveMQ 5.15.
With this we are defining a client (to server) heartbeat of 20 seconds. The notification of this time is built into the STOMP protocol so communicated to the server.
CONNECTED server:ActiveMQ/5.15 heart-beat:0,20000 session:ID:app.server.mycompany.com-43039-1617089631808-3:3585 version:1.1
The client heartbeat code depends on browser setInterval() and this doesn't appear fully reliable so occassionally the heartbeat doesn't get sent and the server then ends up killing the connection.
Transport Connection to: ws://10.x.x.x:50670 failed: org.apache.activemq.transport.InactivityIOException: Channel was inactive for too (>20000) long:
I have noticed that there is a transport.hbGracePeriodMultiplier setting on pure Stomp connector in ActiveMQ however the Stomp over WS client connects in on ActiveMQ WebSocket connector.
My question is: is there an equivalent grace period setting for WebSockets?
I understand that RSocket connection is bidirectional.
How long can a client be connected to a server via RSocket before the connection is terminated?
And if the connection actually does terminate, how does it get reconnected if the server wants to send something to the client?
Minutes, Days or Weeks?
It's dependent on your use. Server to Server with lifetime of those servers. Or Mobile connecting to a backend with sticky routing and resumption.
However while the connection is bi-directional, the client must always initiate the (re-)connection.
https://github.com/rsocket/rsocket-java/blob/d903e9635a159285b6943ea93156c31aa406ba5d/rsocket-examples/src/main/java/io/rsocket/examples/transport/tcp/resume/ResumeFileTransfer.java
I'm using socket.io v.1.4.5.
Is there no easy way to listen to the pings a socket.io server receives from connected sockets. I'm talking about the automatic, shockingly undocumented pings/heartbeats socket.io sends and receives (the interval of which, you can change with pingInterval). On the client, I can listen to the ping backs from the server with socket.on('pong') but not on the server.
Do I really need to create my own ping and pong events and run them on top of the ones socket.io automatically sends to have event handlers on both the server and client side?
One of my app need socket connection.
I tested on nitrous.io, but their free account always close the socket connection if there is no signal between server and client more than 1 minute.
Just wonder if there is similar socket connection limitation on heroku?
Your comment welcome
Heroku has support for WebSockets, with the usual 30s timeout limitation. This can be easily worked-around by sending heartbeat packets.
https://devcenter.heroku.com/articles/heroku-labs-websockets