- Web Sockets
- Socket.io Tutorial
- Socket.io vs Web Sockets
- OSI Model Explained
- TCP Handshakes Explained
- Socket.io Docs
- Socket.io Server API
- Socket.io Client API
- Socket Testing Tool
- Class README
-
What is a web socket?
- A web socket is a communication protocol that provides a full-duplex communication channel over a single TCP connection. It is used to create interactive web applications that support real-time communication between a client and a server.
-
Describe the Web Socket request/response handshake and what happens once the connection is established.
- The client sends a request to the server to establish a connection. The server responds with a 101 status code if the connection is successful. Once the connection is established, the client and server can send messages to each other.
-
Web Sockets provide a standardized way for the server to send content to a client without first receiving a ____ from that client.
- Web Sockets provide a standardized way for the server to send content to a client without first receiving a request from that client.
-
What does the event handler
io.on()do?- The event handler
io.on()listens for events and executes a callback function when the event is triggered.
- The event handler
-
Describe some possible proof of life or proof that the code works as expected:
- The server console logs a message when a client connects to the server.
- The client console logs a message when the client connects to the server.
- The client console logs a message when the client receives a message from the server.
- The server console logs a message when the server receives a message from the client.
-
What does
socket.emit()do?- The
socket.emit()method sends a message to the server.
- The
-
What is the difference between WebSocket and Socket.io?
- WebSocket is a communication protocol that provides a full-duplex communication channel over a single TCP connection. Socket.io is a library that enables real-time, bidirectional and event-based communication between the browser and the server.
-
When would you use socket.io?
- Socket.io is used to create interactive web applications that support real-time communication between a client and a server.
-
When would you use WebSockets?
- WebSockets are used to create interactive web applications that support real-time communication between a client and a server.
- What are a couple of takeaways from this video?
- The OSI model is a conceptual model that describes the communication functions of a telecommunication or computing system without regard to its underlying internal structure and technology.
- The OSI model is a conceptual model that describes the communication functions of a telecommunication or computing system without regard to its underlying internal structure and technology.
- The OSI model is a conceptual model that describes the communication functions of a telecommunication or computing system without regard to its underlying internal structure and technology.
- Translate the gist of the video to a non-technical friend.
- The TCP handshake is a three-way process that establishes a connection between a client and a server. The client sends a SYN packet to the server. The server responds with a SYN-ACK packet. The client responds with an ACK packet. The connection is established.
-
What are your learning goals after reading and reviewing the class README?
- Goal 1: I want to understand how to use Socket.io to create interactive web applications that support real-time communication between a client and a server.
- Question 1?
- Answer 1.
