This repository contains code for a simple server that receives motion information from a client using both Flask and Socket programming. The server listens for incoming data over a socket connection and communicates with clients using the Flask framework.
- Listens for motion data from clients over a socket connection.
- Provides an API endpoint to retrieve motion information using Flask.
- Python 3.x
- Flask library (
pip install flask
)
- Clone or download this repository to your local machine.
- Make sure you have Python 3.x installed.
- Install the Flask library if you haven't already by running
pip install flask
. - Open a terminal and navigate to the repository directory.
- Run the server by executing the
server.py
file using Python:python server.py
. - The server will start and listen on port 8081.
You can access the motion information using the following endpoint:
- The server listens on all available IP addresses (0.0.0.0) on port 8081.
- The code demonstrates the usage of Flask to create an API endpoint and Socket programming for communication with clients.
- The server waits for incoming connections over the socket connection, receives motion data, and responds accordingly.
mitradeniz
This project is licensed under the MIT License.
For more details, please refer to the GitHub repository:.