Jamie's tech blog

The Blue Nowhere

[Backend Note] Using socket.io or ws in NodeJS

Simple websocket usage in NodeJS and Vue

Websocket is a network transport protocol based on TCP. In a normal GET/POST http request, after the data has been transferred, the TCP connection is closed via the four-way handshake; but in the WebSocket protocol, once the client and server complete the TCP handshake, they can maintain a long-lived connection.