The s_server program reads stdin and sends is to the client; it reads from the client and sends it to stdout. It doesn't implement any protocol.
But you can use that code as a basis for your homework :) /r$ -- Principal Security Engineer Akamai Technology Cambridge, MA