socket io socket emit vs send
// allows you to emit custom events on the server and client
socket.emit('my event', 'my data')
// sends messages which are received with the 'message' event
socket.send('my message')
socket io socket emit vs send
// allows you to emit custom events on the server and client
socket.emit('my event', 'my data')
// sends messages which are received with the 'message' event
socket.send('my message')
io.emit vs socket.emit
socket.emit('message', "this is a test"); //sending to sender-client only
io.emit('message', "this is a test"); //sending to all clients, include sender
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us