I have a c application running on Linux OS\'s. This app gets keyboard keys from a terminal and sends them to remote server.
The code below opens the terminal:
If the receiving end doesn't echo, you need to enable this. If the receiving end echoes, you disable it, otherwise you end up with seeing everything double.
Here everything is explained:
In canonical mode: Input is made available line by line. An input line is available when one of the line delimiters is typed (NL, EOL, EOL2; or EOF at the start of line).
Basically, data is sent after EOL, rather than per character.