To compile just run make from command line.
To compile this code you will need gcc and make.
debian: apt-get install build-essential centos: yum install make && yum install gcc
To use run you@server:/folder/path/# ./annoying_server portnumber &
use jobs to see what servers you are running
to test the server use telnet to the port number
telnet 127.0.0.1 portnumber
./annoying_server 21 &  13682
you@server:/folder/path# telnet 127.0.0.1 21 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. what is it Here is the message: what is it
I got your messageConnection closed by foreign host.
YAH! You now have an annoying server to setup during ctf.
Use make clean to delete and binary so you can recompile
you@server:/folder/path# make clean
A great thing about this is it displays to the terminal what was sent by the remote connection so you can see what exploits people are using.