S
S
sema-fedotov2020-09-06 21:52:38
Socket.io
sema-fedotov, 2020-09-06 21:52:38

How to track socket.io disconnect?

Hello, how can I track the disconnect on the client?
I know that on the server it's done like this

socket.on('disconnect', () => {
   // code...
})


But this method does not work on the client. How to track it on the client?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question