Skip to main content

Websockets

Symbl's Streaming API is based on WebSocket protocol. This Web Socket is a general-purpose protocol that suits any application designed for real-time, two-way communication within a browser — like chat apps, collaboration software, and multiplayer games.

So, what is Websocket?#

WebSockets are a thin transport layer built on top of a device’s TCP/IP stack that support the famous “full duplex” connection.

To make Websocket connection#

We need to establish WebSocket connection, an HTTP-based handshake is exchanged between the client and the server.

Once successful, the application-layer protocol is “upgraded” from HTTP to WebSockets.

This allows data to be sent or received using WebSockets with a much lower latency and less technical overhead than the traditional HTTP request-response cycle.

For either of those to run smoothly, the application had to establish a two-way communication so that both the client app and the server could send messages to one another, at the same time.