This was an individual project in the course "DATA2410 Networking and cloud computing" at OsloMet.
The task was to create Python chatbots that could talk to eachother via. a socket API.
In this project there are two Python files:
- server.py: Used to host the chat session.
- Requires port number as argument:
python3 server.py 4242
- Type server.py --h for more info:
usage: server.py [-h] [-v] port Start chatserver. Eks: server.py 4242 positional arguments: port Port som server skal kjøre på. Må være heltall. optional arguments: -h, --help show this help message and exit -v, --verbose Vis debug info.
- Requires port number as argument:
- client.py: The bots.
- Requires hostname, port number and bot name as arguments. The bot name can be whatever you want.
python3 client.py localhost 4242 Bob
- Type client.py --h for more info:
usage: client.py [-h] host port bot Koble til chatserver. Eks: client.py localhost 4242 Joe positional arguments: host Server som bot skal koble til. port Port som bot skal koble til. Må være heltall. bot Navnet på bot. optional arguments: -h, --help show this help message and exit
- Requires hostname, port number and bot name as arguments. The bot name can be whatever you want.