Hi,
Ich programmiere zurzeit ein Programm das vom FTP Server Dateien Down-/Uploaden kann!
Leider stürzt das Programm immer bei ca. 387'801 Bytes ab mit der Fehlermeldung 'Socket Send abgebrochen!'
Hier den Quell Code beim Downloaden:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8:
| Status.Panels[0].Text := 'Downloading...'; Gauge.Progress := 0; Gauge.MaxValue := 1; FTPClient.Download(FTPClient.CurrentDir + '/' + Grid.Cols[0].Strings[Grid.Row], Folders.Directory + Grid.Cols[0].Strings[Grid.Row]);
Status.Panels[0].Text := ''; Button3.Click; |
Dann noch:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
| procedure TFormMain.FTPClientPacketRecvd(Sender: TObject); begin If Gauge.MaxValue <> 1 then begin Gauge.Progress := FTPClient.BytesRecvd; Status.Panels[1].Text := IntToStr(FTPClient.BytesRecvd) + '/' + IntToStr(Gauge.MaxValue) + ' Bytes' end else Gauge.MaxValue := FTPClient.BytesTotal; end; |
Legende:
Grid = TStringGrid;
Gauge = TGauge; (Unter Beispiele)
FTPClient = TNMFTP;
Status = TStatusBar;
Button3 = Refresh Button;
Ich hoffe ihr könnt mir helfen!
MfG Syngel Kid