Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Re: Detect when command complete
| Subject: | Re: Detect when command complete |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Wed, 3 May 2006 11:45:45 |
"Jon" <JonJacobs@comcast.net> wrote in message
news:4458c1e6$1@newsgroups.borland.com...
> when I send the save command, the server app has not processed
> (receiving) all the lines, even though it sent back a success response
> for each one.
Sounds like your server code is not set up properly then. Please show your
actual code. You should not be sending a 0 response back to the client for
each line until each line has actually been processed.
> If I put a sleep command in the client before sending the save, it all
works fine.
All the more reason to think that your server is sending back its responses
too soon.
> Is there a way detect if the server has finished processing all the
> commands for that connection (each connection is a separate
> thread) so I don't have to put in an arbitrary sleep?
Don't send responses back until the work is actually finished to begin with.
> There is probably a better way to send a file to a service than 1
> text line at a time
Yes, there is. You could send the entire file as a TStream with a single
command.
Gambit