Autor Beitrag
Timbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: Fr 21.07.06 16:51 
Hallo,

ich übertrage einen Stream vom Client zum Server mit den Indy TCP-Komponeten.
Funzt auch alles prima, bin aber jetzt bei der Fehlerbehandlung.

Wenn der Server nicht läuft bekomme ich eine Exception beim Client, ist OK.

Wenn aber beim Server eine Exception auftritt, z.B. er kann keine Datei aus dem Stream erzeugen, denkt der Client es hat alles geklappt, da keine Exception weiter gereicht wird...

Benutze den Server so:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TForm1.IdTCPServer1Execute(AThread: TIdPeerThread);
var
  fStream:TFileStream;
begin
  fStream := TFileStream.Create('c:\empfang.txt',fmCreate);
  AThread.Connection.ReadStream(fStream,-1,true);
  FreeAndNil(fStream);
end;


Was kann man denn da machen?
Wie kann ich dem Client mitteilen, das alles OK war, oder ein Fehler aufgetreten ist.

Muss ich dann auf dem Client auch noch einen Server laufen lassen?

Vielen Dank.


Zuletzt bearbeitet von Timbo am Fr 21.07.06 17:43, insgesamt 1-mal bearbeitet
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: Fr 21.07.06 16:52 
leer


Zuletzt bearbeitet von Timbo am Fr 21.07.06 17:42, insgesamt 1-mal bearbeitet
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: Fr 21.07.06 17:02 
fehler
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: Fr 21.07.06 17:03 
leer


Zuletzt bearbeitet von Timbo am Fr 21.07.06 17:42, insgesamt 1-mal bearbeitet
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Fr 21.07.06 17:06 
Was machst du?!? :shock: :shock: :shock:

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.
Timbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 166



BeitragVerfasst: Fr 21.07.06 17:40 
hä, was denn hier los???

ohhh, mein fehler, bin mit den knöpfen durcheinander gekommen... zitat und edit

ich versuch mal aufzuräumen


Zuletzt bearbeitet von Timbo am Fr 21.07.06 17:41, insgesamt 1-mal bearbeitet
Born-to-Frag
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1094

Win XP SP2, Win 2000 SP4
Delphi 7, 2k5
BeitragVerfasst: Fr 21.07.06 17:41 
Weil du statt dem EDIT-Button immer auf den QUOTE-Button drückst :roll:

_________________
Theorie ist wenn man alles weiß, aber nichts funktioniert. Praxis ist wenn alles funktioniert, aber niemand weiß warum.
Microsoft vereint Theorie und Praxis: Nichts funktioniert und niemand weiß warum.