Autor Beitrag
avenger
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 90



BeitragVerfasst: Do 11.03.10 02:59 
Hallo,

Habe folgenden code der via Indy Server TCP Strings empfaengt.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TU_Main.IdTCPServer1NoCommandHandler(ASender: TIdTCPServer;
  const AData: String; AThread: TIdPeerThread);
begin
  lboxresults.Items.Add(AData);
end;

Funktioniert auch soweit Prima. Ich kann mich mit Telnet verbinden und das memo zeigt die korrekten Strings an. Nun habe ich versucht mich mit einer anderen Anwendung versucht zu verbinden und einen String zu empfangen un hier habe ich Probleme. Der Server verbindet sich mit der Anwendung aber das NoCommandHandler Event wird nicht ausgeloest. Nun habe ich mal Wireshark gestartet und die Protokolle mitgeschnitten.

Wenn die PC Anwendung den String schickt meldet Wireshark ein Malformed Package der Laenge 2. Das kuriose ist aber das es bei Telnet genau das gleiche anzeigt, aber hier gibt mein TCP Server den String des Malformed Package aus.

Verstehe ich hier was falsch oder warum verschluckt mein TCP Server den String und triggert nicht das Event ?

Moderiert von user profile iconNarses: Quote- durch Delphi-Tags ersetzt
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 11.03.10 12:26 
Moin!

Sehr viel schlimmer ist die Tatsache, dass du unsychronisiert aus einem Thread auf VCL-GUI-Elemente zugreifst. :shock: Das kann die komischsten Effekte, bis hin zu einem Absturz, auslösen! :idea:

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
avenger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 90



BeitragVerfasst: Do 11.03.10 14:53 
Moderiert von user profile iconNarses: Komplett-Zitat des letzten Beitrags entfernt.

Das weiss ich aber das ist ja im moment nicht mein Problem da das Event ueberhaupt nicht ausgeloest wird, also werden auch keine VCL elemente aufgerufen, oder ?
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 11.03.10 14:58 
Moin!

user profile iconavenger hat folgendes geschrieben Zum zitierten Posting springen:
Das weiss ich aber das ist ja im moment nicht mein Problem da das Event ueberhaupt nicht ausgeloest wird, also werden auch keine VCL elemente aufgerufen, oder ?
Wenn das Ereignis nicht eintritt, solle auch nix passieren, das ist richtig.

Welche Delphi-/Indy-Versionen?

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
avenger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 90



BeitragVerfasst: Do 11.03.10 15:05 
user profile iconNarses hat folgendes geschrieben Zum zitierten Posting springen:
Welche Delphi-/Indy-Versionen?

9.00.10

Moderiert von user profile iconNarses: Zitat gekürzt.
Boldar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1555
Erhaltene Danke: 70

Win7 Enterprise 64bit, Win XP SP2
Turbo Delphi
BeitragVerfasst: Do 11.03.10 15:06 
Woher weisst du denn, das es nicht ausgelöst wird?
avenger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 90



BeitragVerfasst: Do 11.03.10 15:08 
user profile iconBoldar hat folgendes geschrieben Zum zitierten Posting springen:
Woher weisst du denn, das es nicht ausgelöst wird?


na hab nen Haltepunkt im Event gesetzt in den er nicht reinlauft.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10183
Erhaltene Danke: 1256

W10ent
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 11.03.10 15:15 
Moin!

Und welche Delphi-Version?

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
avenger Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 90



BeitragVerfasst: Do 11.03.10 15:24 
user profile iconNarses hat folgendes geschrieben Zum zitierten Posting springen:
Moin!

Und welche Delphi-Version?

cu
Narses


Sorry
Delphi 7 Professional