Skip to content

asarm/websocket-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

websocket-example

Github Repo Url: https://github.com/asarm/websocket-example

An app that simulates an IoT ecosystem. The server-side was written in C. It functions by periodically reading data from five different sensors across 30 different rooms. The server aggregates this data and sends it through a WebSocket. I developed a middleware that listens to the socket, and when new data arrives, it sends this information to the web application. The web app is written using Flask, JavaScript, and HTML. It lists the available rooms on the home page, and the room detail page displays the latest data of the selected room, including a real-time updating CO2 chart.

Follow these steps to run locally:

  1. Run the web app (using "python web_app.py")
  2. Run the consumer side (using "python consumer.py")
  3. Build the server code (using "gcc -o server.exe main.c -lws2_32")
  4. Run the server.exe

About

IoT ecosystem simulation with C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published