1// allows you to emit custom events on the server and client
2socket.emit('my event', 'my data')
3
4// sends messages which are received with the 'message' event
5socket.send('my message')
1socket.emit('message', "this is a test"); //sending to sender-client only
2io.emit('message', "this is a test"); //sending to all clients, include sender