Socket.io
Readings
-
Web Sockets
-
What is a Web Socket?
- is a computer communications protocol, providing full-duplex communication channels over a single TCP connection
-
Describe the Web Socket request/response handshake and what happens once the connection is established.
- the WebSocket handshake uses the HTTP Upgrade header to change from the HTTP protocol to the WebSocket protocol
-
Web Sockets provide a standardized way for the server to send content to a client without first receiving a __ from that client.
-
Socket.io Tutorial
-
What does the event handler io.on() do?
- handles connection, disconnection, etc., events in it, using the socket object.
-
Describe some possible proof of life or proof that the code works as expected
- server side-The best way to see what information is available is to use the
* Client side-localStorage.debug = '*'; in console
-
What does socket.emit() do?
- This allows you to emit functions
-
Socket.io vs Web Sockets
-
What is the difference between WebSocket and Socket.IO? (think Git and GitHub, or OAuth and Auth0).
- WebSocket establishes http connections while Socket.IO is the library to handle WebSocket
-
When would you use Socket.IO?
- I handle all the degradation of your technical alternatives to get full-duplex communication in real-time.
- It also handles the various support level and the inconsistencies from the browser.
- It also gives the additional feature room support for basic publish infrastructure and thinks like automatic reconnect.
- Currently, AFAIK is the most used one and easier to help with vanilla web sockets.
-
When would you use WebSockets?
- It provides full-duplex communication, which helps in persisting the connection established between the Client and the Web Server.
- It also lives up to the standards and provides the accuracy and efficiency stream events to and from with negligible latency.
- WebSocket removes the overhead and reduce complexity.
- It makes real-time communication effortless and efficient.
Videos
Bookmark and Review
Things I want to know more about
- I’d like to go over the videos again to be able to accurate anser the questions