node.js - Socket.IO - how do I close socket with socketID in socket.io 1.3.6? -


i developing application of two-way communication in socketio.

i using following method send specific user.

io.to(socket.id).json.emit('message', message); 

how close socket socketid in socket.io 1.3.6?

to borrow wisdom.

you can use:

io.sockets.connected[socketid].disconnect(); 

Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -