Maintaining WebSocket Connections
Discover how WebSocket maintains a connection and the importance of a secure connection.
Sending and receiving data
When we open the DevTools, we may notice a “Messages” tab. This tab shows all messages that are sent to or received from the server. The DevTools for our application looks like this:
We can ignore the error message for now; the important thing to note is that a WebSocket can send messages (green background) and receive messages (white background). This two-way data transmission can happen in both directions simultaneously.
Full-duplex connection
A connection that is capable of two-way data transmission is called a full-duplex connection.
WebSockets transmit data through a data framing protocol. We can’t see it with the DevTools, but it’s worth knowing this provides security benefits and allows WebSocket ...