These are chat archives for IndySockets/Indy

Sep 2018
Sep 30 2018 01:07


@code4tips yes, you can reject the connection if auth fails. Just close the connection, or raise an exception. I would defintely recommend using streams, ESPECIALLY if you are dealing with such large files. You don't want to download a 4GB file and then have to decompress it separately, that will take way too much time and waste way too much disk space. You can decompress the data in chunks as the file is being downloaded, writing only the uncompressed bytes to disk. That will also allow the client to get a reply immediately after finishin the transfer and not have to wait to get it at some unknown future time. If you were having problems with streaming then you likely just weren't doing it correctly.

Thanks for the tips. Much easier managing code in CmdTcpServer. I am seeing one issue - When I do TCPClient.Sendcmd('TEST1', 200). The TEST1 handler in the TCPCmdServer appears to be returning two responses back. The second one just has '.' (period) in it. Is this normal? To work around it I had to code the client to execute two ReadLn, one before the command and one after. The one before retrieves the '.' (period) and the one after the actual response.

Sep 30 2018 01:36
the second part with the . is for data. Some command return data too. If your command does not return data, there are methods to do that also but Id have to look in code to remember which one.