4.6.0-alpha1
walde1024
tagged this
24 Jan 08:24
The RemoteSocket interface, which is returned when the client is connected on another Socket.IO server of the cluster, was lacking the `timeout()` method. Syntax: ```js const sockets = await io.fetchSockets(); for (const socket of sockets) { if (someCondition) { socket.timeout(1000).emit("some-event", (err) => { if (err) { // the client did not acknowledge the event in the given delay } }); } } ``` Related: https://github.com/socketio/socket.io/issues/4595
Assets 2
-
2023-01-24T08:24:19Z -
2023-01-24T08:24:19Z - Loading