William Cao Period 10
A chat program in which up to 20 people can connect to one computer (host) and talk to one another. The host saves the chat log for continutation in the future.
None!
- Clone this repository using https:
$ git clone https://github.com/WilliamC07/c-chatter.git
- Run make:
$ make
- The host computer should run one of the following:
To open an existing chat, run:
To create a new chat, run:
$ ./output -o <name of chat> # To see chat that you have run $ ls ~/.slothchat
Note: Your username cannot be more than 25 characters long. The program will cut off additional characters. Username cannot be "system" or "System"$ ./output -c <name of chat> <your username>
- Everyone who wants to run the program should run:
Note: there can be a maximum of 20 active people connected including the host. Note: Your username cannot be more than 25 characters long. The program will cut off additional characters. Username cannot be "system" or "System"
$ ./output -j <host IPv4 address> <client username>
- You can start typing right away and send messages! Just press enter at the end of your message. You are capped at 255 characters. The program will ignore all input past 255 characters.
- Your message cannot start with a white space nor be blank (no characters/only white space).
- Use the up and down arrow keys to scroll the chat. Don't have up and down arrow key? Get a real keyboard.
- How do i read the display? Here:
- Press Control-C to exit the program. If you are host, the chat will automatically be saved. If you are a client connecting, you will not get a copy, there is no option to do so.
$ ./output -h
- Delete the repository
- Delete "~/.slothchat"
$ rm -rf ~/.slothchat
- This isn't really a bug, there there are some extended waiting periods (hardcoded wait() periods) for the socket to be ready or packet to be sent out before shutting down the server.
- Also not really a bug, I didn't implement the feature to notify everyone when someone joins the chat. Only notifies if someone leaves the chat. It is a feature for the FBI to spy on chat more easily.
- Entering raw mode
- Terminal escape values (ex.setting text color): this and this
- Threading
- Networking: dw and this
- Checking if port is open (this isn't code, it is to help me debug)
- I hope there aren't any race conditions :)
- The program uses port 7777