N
N
Nwton2016-07-18 20:26:57
JavaScript
Nwton, 2016-07-18 20:26:57

How to disconnect from socket io client side?

What command on the client side can voluntarily terminate the connection to the io server?
Obviously, the client can send a request and ask to be disconnected. But how to do it right away, without communicating with the server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
miki131, 2016-07-19
@Nwton

If you are using socket.io then
socket.close()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question