First, make both shell scripts executable:
$ chmod +x compile.sh
$ chmod +x run.sh
Compile the C-code with the shell script compile.sh
:
$ ./compile.sh
Run the program by executing the shell script run.sh
:
$ ./run.sh
As soon as the program runs, you can make some tests by utilizing netcat
. Open up another terminal and connect to the server. netcat
is used as a TCP client for testing purposes.
$ nc 127.0.0.1 3490
After a successful connection it should show something similar to this in the terminal:
hello client
�"
You may type some input characters and send them to the server after you hit return.