Great article about creating sockets straight from your shell, which you can use for creating simple application runnig on selected port.