Chat between two terminals with this simple chat system. Connect with UDP by inputing IP and port number. This program will be multithreaded to allow concurrency.
- Clone the repository
git clone https://github.com/Tooo/Simple-Talk.git
- Make the objects and executable file:
make
- Run the executable in two local or remote terminals:
s-talk [my port #] [remote IP] [remote Port #]
- Start chatting by inputing messages and pressing enter
- Terminate both session with typing this input in one of the terminals.
!
This program will run with six threads. Four are used for the chat system and two are used for intializing and cleaning up.
Threads | Purpose |
---|---|
Main | Starts the other five threads |
Keyboard Input | Receive inputs from local computer Sends messages to Sender |
Sender | Receive messages from Keyboard Input Sends messages to remote terminal |
Receiver | Receive messages from remote terminal Sends messages to Screen Output |
Screen Output | Receive messages from Receiver Prints messages to screen |
Shutdown Manager | Locked when messaging system is active Active when message system terminates |