Skip to content

DevLizOps/python-socket-tcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Haz click aquí para acceder a la Versión en Español

English

Python Socket TCP Client-Server

A Simple Client-Server Application Using TCP Sockets in Python

This repository demonstrates a basic client-server communication setup using TCP sockets implemented in Python. The server and client can be run locally to facilitate communication between two processes on the same machine.

Table of Contents

Overview

This project sets up a basic client-server model using TCP sockets in Python to facilitate communication between two processes on the same machine.

Setup

Prerequisites

  • Python 3 installed on your machine.

Local Setup

  1. Clone the repository:

    git clone https://github.com/DevLizOps/python-socket-tcp.git
    cd python-socket-tcp
    
  2. Ensure Python 3 is installed:

    python3 --version
    

Running the Application

Starting the Server

  1. Open a terminal and navigate to the directory containing server.py.

  2. Run the server script:

    python3 server.py
    

Starting the Client

  1. Open another terminal and navigate to the directory containing client.py.

  2. Run the client script:

    python3 client.py
    

Testing Communication

Follow the prompts on both the server and client to send and receive messages, verifying that the communication works correctly.


Español

Click here to go back to the English version

Descripción General

Este proyecto muestra una configuración básica de comunicación cliente-servidor utilizando sockets TCP implementados en Python. El servidor y el cliente pueden ejecutarse localmente para facilitar la comunicación entre dos procesos en la misma máquina.

Tabla de Contenidos

Descripción General

Este proyecto establece un modelo básico de cliente-servidor utilizando sockets TCP en Python para facilitar la comunicación entre dos procesos en la misma máquina.

Configuración

Requisitos Previos

  • Python 3 instalado en tu máquina.

Configuración Local

  1. Clona el repositorio:

    git clone https://github.com/DevLizOps/python-socket-tcp.git
    cd python-socket-tcp
    
  2. Asegúrate de que Python 3 esté instalado:

    python3 --version

Ejecución de la Aplicación

Iniciar el Servidor

  1. Abre una terminal y navega hasta el directorio que contiene server.py.

  2. Ejecuta el script del servidor:

    python3 server.py
    

Iniciar el Cliente

  1. Abre otra terminal y navega hasta el directorio que contiene client.py.

  2. Ejecuta el script del cliente:

    python3 client.py
    

Prueba de la Comunicación

Sigue las instrucciones en ambos, servidor y cliente, para enviar y recibir mensajes, verificando que la comunicación funcione correctamente.

About

A Simple Client-Server Application Using TCP Sockets in Python.

Resources

Stars

Watchers

Forks

Languages