I'm less sure of what you're asking for now. Is your CGI sending multiple
commands to the server in one session, but you are not seeing all of the returns from the commands until
you close the session?
If so you may look into adding some socket flushes to the
server (and client) to flush the sockets after each
"block" is ready to be sent. I generally use IO::Socket
which has autoflush built into it by default.