I have built the first prototype of the chat client - currently all the code is split into a server and client file however I will be shifting to an OOP approach before publishing this first iteration to GitHub. I have added a basic TUI in curses alongside some args that can be passed when the program is run, these are:
-s/–server –> change server (defaults to 0.0.0.0)
-p/–port –> change port (defaults to 6000)
-u/–username –> set username (defaults to your local device username)
Username formats all follow the same structure:
[username]@[hostname]
where username is either your local account username (ie the name of your home directory) or the username passed as an argument to the program and hostname is your device’s hostname.
The server is required for clients to be able to talk over a LAN/network - the server logs all users, messages and allows for clients to fetch the online users to display in a user list on the main TUI.
I have also implemented a status bar which gives the current time, number of users connected, your ping in ms, and your uptime as a client.
Some networks such as my school network prevent me from using this client to chat over a LAN (something to do with opening ports and connecting to sockets) - a work around I have devised for this is to use a tunneling service to tunnel the port my server is hosted at to an IP that is accessible from any network.