a communication protocol that provides full-duplex communication channels over a single TCP connection.
## Describe the Web Socket request/response handshake and what happens once the connection is established.
to establish a connection between the client and the server.
nce the client receives the server’s response and confirms that it is a valid WebSocket handshake, the connection is considered established. At this point, both the client and server can send messages to each other asynchronously, without the need for a traditional request-response cycle. The WebSocket connection remains open until either the client or the server decides to close it.
request
n event handler that listens for various events emitted by the Socket.IO server object (io). It allows you to handle different types of events and perform actions in response to those events.
Basic Functionality Test, Unit Testing, Integration Testing, Load Testing
is used to send an event from the server to an individual client or a specific room. It allows the server to emit custom events and send data directly to the client or clients that are connected to the server.
WebSocket is a communication protocol that provides a standardized way for a client and server to establish a full-duplex, persistent connection over a single TCP socket. Socket.IO is a JavaScript library that simplifies real-time, event-based communication between the client and server.
Socket.IO is commonly used in scenarios where real-time, bidirectional communication is required between the client and the server
WebSockets are suitable for scenarios that require real-time, bidirectional communication between a client and a server
The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes the functions of a communication system into seven distinct layers. Each layer of the OSI model serves a specific purpose in the process of transmitting data over a network.
You and your friend stand facing each other, ready to start the handshake.
You reach out your hand and say, “Hey, friend, I want to establish a connection with you.”
Your friend shakes your hand and replies, “Sure, I’m ready to connect. Let’s start.”
Now that the connection is established, you can start sharing your secret messages.
You begin by saying, “Here is my secret message,” and your friend listens attentively.
Your friend responds, “Thank you for the message. I got it.”
This back-and-forth continues as you exchange more messages, knowing that the connection is secure and reliable.
getting more proficient with socket