If I just want a simple "server" that listens for a text message on a port, does something, and sends back a text message, do I just need to somehow:

1.  Create a Socket and listen on the port.
2.  Create a SocketStream on: theSocket.
3.  Somehow fork and wait for input, reading it in using the SocketStream?

I just want to make sure I am on the right track while trying to find the magic incantation...

Thanks,

Rob