This is a peer-to-peer chat application that allows multiple instances to connect and communicate with each other.
- Prince:
help,list,terminateandconnect - Sultan:
sendcommand and received message handling - Bryson:
myip,myport,exit, socket creating and listening to incoming connections
python3 main.py <listening_port>help- Show available commandsmyip- Display this machine's IP addressmyport- Display the listening portconnect <destination> <port>- Connect to another instancelist- Show all active connectionssend <connection_id> <message>- Send message (max 100 chars)terminate <connection_id>- Close a connectionexit- Close all connections and exit
- Start first instance:
python3 main.py 12345 - Start second instance:
python3 main.py 12346 - In second instance:
connect 127.0.0.1 12345 - Send messages:
send 1 Hello World! - List connections:
list
Bonus Project: Bryson: Handle sendfile in main() Prince: implement sendfile() Sultan: implement receiving files