This guide walks you through the process of creating a web application such as “Chatbots” that passes the messages between browser and server. WebSocket is a protocol for creating a fast-two-way channel between a web browser and a server. It is a very thin, lightweight layer above TCP, this makes it suitable to use “sub-protocols” to embed messages.