This repository is for Assignment 1 -- Wire Protocols (Chat Application) of CS 262: Introduction to Distributed Systems.
Note that the chat application currently only works between sockets on the same Wi-Fi network. We target a single server setup that can support multiple clients. Clients can log on and off the chat application without deleting account.
The implementations for both part 1 and part 2 are in Python (developed and tested using Python 3).
Relevant non-standard packages to install include:
grpcio
grpcio-tools
Install these packages using your preferred package management tool before proceeding.
Sample command using pip
: pip install grpcio grpcio-tools
.
To run the code,
cd
into the corresponding directory (i.e.,cd part_1
orcd part_2
).- Find out your IP address on the Wi-Fi network by using
ipconfig getifaddr en0
- Edit the
SERVER_IP
configuration variable withinserver.py
to use the IP address found in step 2. - Launch server socket:
python3 server.py
. - Launch client socket(s);
python3 client.py SERVER_IP
. whereSERVER_IP
is the IP address found in step 2. - Enjoy (and follow instructions in prompt, of course)!