Skip to content

About

A mini industrial communication system that ensures safe data transfer using CRC and visualizes results in a real-time dashboard.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Client-Server-Socket

Building a Server & Client socket, using the Socket module, and making them communicate over their respective IPs.

File Structure

ParentFolder
|
|-server_test.py
|-crc_input.py
|-socket_utils.py
|-streamlit_app.py
|-tests/test_socket_utils.py

Install streamlit

use command

pip install streamlit

Run

First run the server:

python server_test.py

Then client:

streamlit run streamlit_app.py

The client sends an 8-byte request (6 data bytes plus CRC) and reads the 37-byte server response (35 data bytes plus CRC). Each of the six request fields is an unsigned byte (0–255); encode_request_data() validates the field count, integer type, and byte range before the CRC is appended. The shared socket helper handles fragmented TCP reads so incomplete packets are not parsed as complete responses.

Tests

The socket framing helper has standard-library unit tests. Run them from the repository root:

python -m unittest discover -s tests -v

Terminal View

User-Interface

About

A mini industrial communication system that ensures safe data transfer using CRC and visualizes results in a real-time dashboard.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages