in reply to Re: Socket programming & CGI hell
in thread Socket programming & CGI hell

I believe this section does just what you've said:

if ($command =~ /^BYE/) { print $new_sock "OK disconnecting . . . \n"; shutdown $new_sock, 2; exit 0; }

Thanks for mentioning security--I should have mentioned, this will be happening inside an SSL-encrypted connection (and doubtless I'll be asking about Net::SSLeay on here soon). The server rejects any connections not coming from a small range currently, but encryption is indeed necessary before I can have anything like real security.

--TQuid

Replies are listed 'Best First'.
RE: RE: Re: Socket programming & CGI hell
by lhoward (Vicar) on Jul 19, 2000 at 22:58 UTC
    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.