reading-notes


Project maintained by Razan-am Hosted on GitHub Pages — Theme by mattgraham

Message Queues

What does it mean that web sockets are bidirectional? Why is this useful?

Does socket.io use HTTP? Why?

What happens when a client emits an event?

What happens when a server emits an event?

What happens if a client “misses” an event?

How can we mitigate this?

Sockets work based on events. There are some reserved events, which can be accessed using the socket object on the server side.These are :

  1. Connect
  2. Message
  3. Disconnect
  4. Reconnect
  5. Ping
  6. Join and
  7. Leave.

The client-side socket object also provides us with some reserved events, which are :

  1. Connect
  2. Connect_error
  3. Connect_timeout
  4. Reconnect, etc.

Terms


References:

@By Socket.IO/Socket.IO

@By Glyn Lewington/Everything You Need To Know About Socket.IO

@By stackoverflow/SOCKET