Giter Site home page Giter Site logo

udp_cli_chatroom's Introduction

UDP Chat Application

This repository contains Python scripts for a basic UDP chat application consisting of a client (client.py) and a server (server.py), enabling communication over the User Datagram Protocol (UDP).

Client Script (client.py)

The client.py script functions as a UDP client for the chat application.

Usage

  1. Run the script: python client.py
  2. Enter your desired nickname.
  3. Messages you send will be displayed in the chat.
  4. To exit the chat, type !q.

Server Script (server.py)

The server.py script functions as a UDP server for the chat application.

Usage

  1. Run the script: python server.py
  2. The server will listen for incoming messages from clients and broadcast them to all connected clients.

How It Works

  • The client script binds to a random port on the localhost and sends a signup message with the chosen nickname to the server.
  • The server script binds to a specific port and listens for incoming messages.
  • When a message is received, the server processes it and broadcasts it to all clients.
  • Clients receive messages and display them in the console.

Important Notes

  • This UDP chat application provides a basic demonstration of communication between clients and a server using UDP.
  • The application lacks advanced features and security mechanisms.
  • It's recommended for educational purposes and local usage only.

udp_cli_chatroom's People

Contributors

malto101 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.