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://192.168.0.85:8989.
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:

http://www.brainboxes.com/files/pages/support/faqs/bb-400-faqs/How-do-I-use-Python-to-control-the-IO-over-WebSockets-on-my-BB400-Port-Number.png

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:


This FAQ Applies to the following Brainboxes Product Ranges: