- Run messaging_server.py first by typing
python3 messaging_server.py
in the command prompt. - Run messaging_client.py next by typing
python3 messaging_client.py
in the command prompt. - Connection should now be established and the client can start the conversation.
Note: At most 2 connections can be maintained in this network.
- First check
clients.py
and see if theifconfig
command is valid for your PC (if not valid the code would have to be changed). - Run the centralized directory server first by typing
python3 centralized_directory_server
- Run as many as 4 clients by typing
python3 clients.py
in different terminals. - Enter the ip address of the network (
0.0.0.0
) in the concerned client's terminal to establish the connection between the centralized directory server and itself. - After establishing connection you can either download existing files in
shared
folder or update the network by adding the file into it. - The clients can act as peers and will ask each other for their required files (the files that they want to receive) by following the instructions of the code. They can receive a file that is already in the network or can wait or can disconnect.