A simple command line chat app to communicate via the terminal.

Overview

command-line-chat

A simple command line chat app to communicate via the terminal. I'm new to networking so sorry if some of my terminology or code is messed up.

  • sending messages
  • recieving messages
  • setting nicknames
  • handling client disconnection
  • somehow make the server public
  • encrypt the messages with end-to-end encryption (like whatsapp)
  • make this web based (this will be a whole project on it's own, allowing for image and emoji sending, and everything you would expect from a general purpose chat app)

Usage

If you want to run the files locally

  • On the server computer, run server.py, This will create a server on the host IP address and on port 6080
  • On each client computer, run client.py, Then input the IP address printed out by server.py, create a nickname and you should be connected to the chat room

If you want to connect to my public server

  • Just run client.py and connect to 213.219.37.71
  • This will most likely be offline but it's worth a try.

sending messages

To send messages I've created my own little protocol where when the user wants to send a message, two packets are sent: a header and the actual message

  • The header contains a padded message of 64 bytes that contains the length of the actual message.
  • The actual message contains the actual content and it is efficiently read to the exact number of bytes it contains, not wasting bandwidth

Recieving messages

When a client sends a message to the server, the server loops through a list of all clients, ignoring the sender. It then sends the original clients message, along with their nickname, to each other client

Nicknames

The nicknames are stored on the server in a dictionary, where the string of the connection object is the key, and the nickname is the value. By default each nickname is just the address of the client, but it can be changed by sending !NICK mynickname

You might also like...
Command line util for grep.app - Search across a half million git repos
Command line util for grep.app - Search across a half million git repos

grepgithub Command line util for grep.app - Search across a half million git repos Grepgithub uses grep.app API to search GitHub repositories, providi

Fylm is a wonderful automated command line app for organizing your film media.
Fylm is a wonderful automated command line app for organizing your film media.

Overview Fylm is a wonderful automated command line app for organizing your film media. You can pronounce it Film or File 'em, whichever you like! It

A lightweight Python module and command-line tool for generating NATO APP-6(D) compliant military symbols from both ID codes and natural language names

Python military symbols This is a lightweight Python module, including a command-line script, to generate NATO APP-6(D) compliant military symbol icon

 A super simple terminal command shortener 🐟
A super simple terminal command shortener 🐟

pcmd A super simple terminal command shortener 🐟 Source code : https://github.com/j0fiN/pcmd Documentation : https://j0fin.github.io/pcmd About Durin

instant coding answers via the command line
instant coding answers via the command line

howdoi instant coding answers via the command line Sherlock, your neighborhood command-line sloth sleuth. Are you a hack programmer? Do you find yours

Gamestonk Terminal is an awesome stock and crypto market terminal
Gamestonk Terminal is an awesome stock and crypto market terminal

Gamestonk Terminal is an awesome stock and crypto market terminal. A FOSS alternative to Bloomberg Terminal.

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)
Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

Simple command line tool for text to image generation using OpenAI's CLIP and Siren (Implicit neural representation network)

A simple command line dumper written in Python 3.

A simple command line dumper written in Python 3.

Simple command-line implementation of minesweeper

minesweeper This is a Python implementation of 2-D Minesweeper! Check out the tutorial here: https://youtu.be/Fjw7Lc9zlyU You start a game by running

Owner
PotNoodle
python dev
PotNoodle
A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Stream your favorite shows straight from the command line.

A command-line based, minimal torrent streaming client made using Python and Webtorrent-cli. Installation pip install -r requirements.txt It use

Jonardon Hazarika 17 Dec 11, 2022
A simple terminal-based localhost chat application written in python

Chat House A simple terminal-based localhost chat application written in python How to Use? Clone the repo git clone https://github.com/heksadecimal/c

Heks 10 Nov 9, 2021
Booky - A command line utility for bookmarking files on your terminal!

Booky A command line utility for bookmarking files for quick access With it you can: Bookmark and delete your (aliases of) files at demand Launch them

Pran 1 Sep 11, 2022
A very simple and lightweight ToDo app using python that can be used from the command line

A very simple and lightweight ToDo app using python that can be used from the command line

Nilesh Sengupta 2 Jul 20, 2022
A cd command that learns - easily navigate directories from the command line

NAME autojump - a faster way to navigate your filesystem DESCRIPTION autojump is a faster way to navigate your filesystem. It works by maintaining a d

William Ting 14.5k Jan 3, 2023
AML Command Transfer. A lightweight tool to transfer any command line to Azure Machine Learning Services

AML Command Transfer (ACT) ACT is a lightweight tool to transfer any command from the local machine to AML or ITP, both of which are Azure Machine Lea

Microsoft 11 Aug 10, 2022
Ros command - Unifying the ROS command line tools

Unifying the ROS command line tools One impairment to ROS 2 adoption is that all

null 37 Dec 15, 2022
A terminal client for connecting to hack.chat servers

A terminal client for connecting to hack.chat servers.

V9 2 Sep 21, 2022
Chat with Rem in Terminal!

Chat with Rem in Terminal!

bariscodefx 1 Dec 19, 2021
Text based command line webcam photobooth app

Skunkbooth Why See it in action Usage Installation Run Media location Contributing Install Poetry Clone the repo Activate poetry shell Install dev dep

David Yang 45 Dec 26, 2022