/server_client

A simple TCP server client communication example

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

server_client

Server client connection via TCP. This is done through the following files

  • server.py : making the message and sending it. This server also measures various time stamps.
  • client.py : receiving the message and sending a simple message back

Once the connection is made and data is transferred, a file report.txt is generated. This file can be processed and even plotted by read_report.py.

The message from the server socket is made using a sine wave which is generated by:

  • generate_sine.py: generate a sine wave with given parameters

Sine generator

Amplitude, frequency, extension with zeros, sampling frequency and the duration of the sine wave can be adjusted.

Server

Server prepares the data in the following format: '#2+1234+1234+1234+1234+1234+1234'.