in reply to Sending and receiving data to standard input and output of the linux based server.
You could try making the server side script into a daemon using HTTP::Daemon