indy

how to send file from server to client using indy

﹥>﹥吖頭↗ 提交于 2021-02-07 09:44:13
问题 I look for an example, how to receive a file from server (I use Indy) I want to send to server some demand On client: MyIdTCPClient.IOHandler.WriteLn('SEND_FILE'); MyIdTCPClient.IOHandler.WriteLn('1.XLS'); On Server procedure TServerMainForm.IdTCPServerExecute(AContext: TIdContext); var AStream : TMemoryStream; filesize : Integer; line, filename: String; begin line := AContext.Connection.IOHandler.ReadLn(); if line = 'SEND_FILE' then begin filename := AContext.Connection.IOHandler.ReadLn();

how to send file from server to client using indy

这一生的挚爱 提交于 2021-02-07 09:43:32
问题 I look for an example, how to receive a file from server (I use Indy) I want to send to server some demand On client: MyIdTCPClient.IOHandler.WriteLn('SEND_FILE'); MyIdTCPClient.IOHandler.WriteLn('1.XLS'); On Server procedure TServerMainForm.IdTCPServerExecute(AContext: TIdContext); var AStream : TMemoryStream; filesize : Integer; line, filename: String; begin line := AContext.Connection.IOHandler.ReadLn(); if line = 'SEND_FILE' then begin filename := AContext.Connection.IOHandler.ReadLn();

how to send file from server to client using indy

 ̄綄美尐妖づ 提交于 2021-02-07 09:43:10
问题 I look for an example, how to receive a file from server (I use Indy) I want to send to server some demand On client: MyIdTCPClient.IOHandler.WriteLn('SEND_FILE'); MyIdTCPClient.IOHandler.WriteLn('1.XLS'); On Server procedure TServerMainForm.IdTCPServerExecute(AContext: TIdContext); var AStream : TMemoryStream; filesize : Integer; line, filename: String; begin line := AContext.Connection.IOHandler.ReadLn(); if line = 'SEND_FILE' then begin filename := AContext.Connection.IOHandler.ReadLn();

IdHTTP.Post - No progress for me to display in a progressbar

前提是你 提交于 2021-02-05 11:59:47
问题 I am trying to display the progress of a POST call from my TIdHTTP component. procedure TForm1.IdHTTP1Work(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64); begin ProgressBar1.Position := AWorkCount; end; procedure TForm1.IdHTTP1WorkBegin(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64); begin Progressbar1.Max := AWorkCountMax; end; However when I debug this, I land 2 times on the .Max = AWorkCountMax; line, and the first time the value is 65, and the 2nd time the value

Delphi : SSL routines:SSL3_GET_RECORD:wrong version number

倾然丶 夕夏残阳落幕 提交于 2021-01-29 21:15:44
问题 I found several topics about the same problem but it didn't help me to resolve my problem. I'm trying to connect to a FTPS server (with Delphi 10.3) using this code: IdSSLIOHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil); IdSSLIOHandler.SSLOptions.Method := sslvSSLv3; IdSSLIOHandler.SSLOptions.SSLVersions := [sslvSSLv2, sslvSSLv23, sslvSSLv3, sslvTLSv1,sslvTLSv1_1,sslvTLSv1_2]; IdFTP.IOHandler := IdSSLIOHandler; IdFtp.UseTLS := utUseExplicitTLS; IdFtp.DataPortProtection := ftpdpsPrivate;

Delphi 7 Indy IdFTP did'nt send/receive data

痞子三分冷 提交于 2021-01-28 07:01:55
问题 2 years ago, I wrote a simple client/server program for someone using Delphi 7 and Indy to send and receive some data through the Internet. I used TIdFTP to connect to their server and get and put data on it. It worked well for 2 years. Today, they have opened another office in another city, and they want to copy the program to their new office computer, but the program doesn't work there. The program connects successfully, but can't read the directory list, or put or get data. If it tries to

Dynamically making indy use TLSv1.2

帅比萌擦擦* 提交于 2020-12-30 08:50:08
问题 GitHub has stopped supporting TLS v1.0 and v1.1 (https://githubengineering.com/crypto-deprecation-notice/), so my code no longer wants to download from it. I have checked and it seems I need to make Indy use TLS v1.2, as stated here: Using Indy 10 IdHTTP with TLS 1.2. I have already updated the OpenSSL DLLs to the latest from http://indy.fulgan.com/SSL/, and Indy seems to load them fine, but I still get an error. The error I get: How can I make Indy use TLS v1.2 if I dynamically create Indy