Explore some of the functions you have access to with Socket.IO's APIs and learn about the emit cheatsheet.
- [Instructor] On Socket.IO documentation,…there is a very handy section where you can get…a better overview of some popular commands you can do,…so let's go through this cheat sheet.…So, go to socket.io/docs/emit-cheatsheet/,…and you can also get to the cheat sheet…if you get from the main website, Docs,…and then Emit Cheatsheet, right here.…This is a good example of how you can transmit messages…through the Socket.IO rooms, and what are the options.…
So, let's go through a few of them.…So, this is the regular way of doing an emit…to a specific room, but you could also emit…to multiple rooms, so let's say, for example,…we have the Javascript and the Swift room,…and we want to emit to both of them.…You could also emit to the Javascript…and then the Swift room, and then emit the message,…for example, this is the nice game event,…and this is the message you want to send it to.…There's also a way to do big messages…to the entire namespace, so for example,…if we wanted to send a message…to the entire tech namespace,…
Released
12/5/2017- Coding the initial Express and Socket.IO server
- Coding front-end HTML
- Creating a chat with the emit function
- Setting up multiple rooms
- Coding new rooms within the namespace
- Setting up the Debug tool
- Emit cheatsheet
Share this video
Embed this video
Video: Emit cheatsheet