working demonstration code for POSIX-threaded server