To run the client remotely, use the following command:
python -m system_main.client --host 192.168.1.10 --port 12345
where 192.168.1.10 is the IP address of the computer hosting the server.
To run the client locally, use:
python -m system_main.client --host 127.0.0.1 --port 12345
To start the server, run:
python -m system_main.server --host 127.0.0.1 --port 12345
To use JSON protocol:
python -m system_main.server --host 127.0.0.1 --port 12345 --protocol json
To use Custom protocol:
python -m system_main.server --host 127.0.0.1 --port 12345 --protocol custom
To use JSON protocol, add the --json flag:
python -m system_main.client --host 127.0.0.1 --port 12345 --json
To use Custom protocol, simply omit the flag:
python -m system_main.client --host 127.0.0.1 --port 12345
The test suite is located in the unit_tests/ directory, including:
tests_db.py: Tests related to database operations.
tests_server_client.py: Tests interactions between the client and server.
To run all unit tests, use the following command:
python -m unittest discover -s unit_tests