I'm studying lua and i found it useful for modeling network applications. I implemented a networked FizzBuzz. For those who dont know what FizzBuzz is, see wikipedia.

The server server.lua accepts tcp connections from port 3515. A client sends a number and the server replies with the same number, Fizz, Buzz or FizzBuzz.

print

You need lua and lua-socket packages for the server, socat for the client.

sudo apt-get install lua lua-socket socat

Run ./server.lua it will listen to port 3515, then run ./client.sh and watch the output.

./server.lua &
./client.sh

Download the source code.