# Websockets

## Introduction
### Why are we going to use websockets? 
With websockets you can establish a connection between the client and the server, and both can send data fast to each other. This is useful for real-time applications like for our project to plot live graphs of the data we are collecting from the sensors.

### How to use websockets
There are different languages to serve websockets with, but we are going to use Python with the library `websockets`. This library is easy to use and has a lot of documentation.

## Issues

### Ports
We can only use certain ports like 113, 80, 443. These are common ports and are not blocked by firewalls. Something in the network is blocking all other ports which makes it hard to use websockets.

A solution for this is to use a reverse proxy. (See [Reverse Proxy](./Reverse-Proxy.md))

#### Sources: 
* https://websockets.readthedocs.io/en/stable/index.html

**Written by Sam**