What is the WebSocket Protocol


This FAQ will explain what the WebSockets Protocol is and the ways in which the BB-400 IO can communicate using this protocol.

What are WebSockets?

WebSockets is a type of API that instead of using a http-based protocol, uses a “socket” connection instead. Sockets can be thought of in a similar way to ports, they facilitate the transfer of data. WebSockets use this connection to allow constant communication between the server and the browser. The advantages of this are lower data overheads, as well as data being transferred over in real time.

WebSockets use a “ws” or “wss” URI, whilst keeping the rest of the URL structure the same as in a http layout, e.g. ws://
For more information regarding WebSockets please refer to the following link.

BB-400 IO and WebSockets

The default port for WebSockets is 8989, as shown by the WebAdmin IO page:

The BB-400 is able to communicate using WebSockets via Python, as well as via a webpage. Please refer to the following FAQs for further information on how to use the WebSockets protocol on the BB-400:

  1. Python: FAQ How do I use Python to control the IO over WebSockets?
  2. Webpage: FAQ How to communicate with Websockets on the BB-400?