Buffered events #4601
-
Is there a way to get an array or list of Buffered events? Let say that the client disconnections and later reconnections. In this case we would have Buffered events but I would like to see what events are buffered as I may not want to emit those events after some time. Another use case would be that I may want to see why there is a delay or messages being received late. I could see what all message are in cue to be sent. |
Beta Was this translation helpful? Give feedback.
Answered by
darrachequesne
Jan 19, 2023
Replies: 1 comment 2 replies
-
Hi! You can use the socket.emit("hello");
console.log(socket.sendBuffer); // prints "[ { type: 2, data: [ 'hello' ], options: { compress: true } } ]" |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
darrachequesne
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! You can use the
sendBuffer
array:Source: https://github.com/socketio/socket.io-client/blob/a1c528b089773d7810a03befaeb982f7e01c3e11/lib/socket.ts#L174