I currently have a chat client
that communicates successfully with a server
. I am supposed to modify the behavior so that the prompt moves down when another chat message is received (i.e. the messages are printed "above" the prompt by printing \b
to erase the prompt, printing the message, and then re-printing the prompt).
We were given a test client
and test server
for testing this functionality, and currently when the user has a prompt but nothing typed in, they can receive messages from other users. When they start typing, the buffer doesn't flush until they type their whole message and hit ENTER.
I am supposed to replicate this behavior, but I am very confused about what raw mode actually is.
Can anyone tell me how to control input/output via raw mode, or why the behavior of the test programs I described above occurs from using raw mode?