Fix URL parsing
Problem: There was a bug in the URL parsing code for connecting the client to external networks (i.e. mllp, pager)
Also update the README.md
Bugs:
The Docker container is not able to connect to the local simulator network.
# Local logs
python -m simulator
mllp: listening on 0.0.0.0:8440
pager: listening on 0.0.0.0:8441
# Docker logs
2024-02-05 12:28:28 ('0.0.0.0', 8440)
2024-02-05 12:28:28 Traceback (most recent call last):
2024-02-05 12:28:28 File "/app/main.py", line 207, in <module>
2024-02-05 12:28:28 s.connect((host, port))
2024-02-05 12:28:28 ConnectionRefusedError: [Errno 111] Connection refused
Using the following run command:
docker run -d -p 8440:8440 -p 8441:8441 -e MLLP_ADDRESS="0.0.0.0:8440" -e PAGER_ADDRESS="0.0.0.0:8441" coursework3