Skip to content

Sam-bot-dev/Server_Client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛰️ Python Socket Client-Server Communication

This project demonstrates a simple TCP/IP socket communication system using Python's built-in socket module. It includes a basic server that listens for incoming messages and a client that sends messages to the server.


📁 Project Structure

├── client.py # Sends message to server └── server.py # Receives and responds to message


🚀 How It Works

🖥️ Server (server.py)

  • Listens on 127.0.0.1:12345
  • Accepts incoming client connections
  • Prints the received message
  • Sends a confirmation response to the client

📡 Client (client.py)

  • Connects to the server on the same IP and port
  • Sends a user-inputted message
  • Displays the response from the server

▶️ How to Run

  1. Open two terminals or run on two separate systems.

Terminal 1: Start the Server

python server.py

🧰 Tech Stack Language: Python 3

Module: socket (Standard Library)

📌 Use Cases Learning how TCP sockets work

Understanding client-server architecture

Foundation for chat apps, multiplayer games, or messaging protocols

📜 License This project is licensed under the MIT License.

🤝 Contributing Pull requests are welcome! For major changes, please open an issue first to discuss what you’d like to change.

Releases

No releases published

Packages

No packages published

Languages