Autor Beitrag
Quake User
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 159



BeitragVerfasst: Do 12.01.06 14:37 
IdUDPClient1.ReceiveString

wartet auf den Empfang von Daten. Wenn keine Daten kommen, leider ewig.
Währe ein Ereignis wie IdUDPClient1.OnDataReceive nicht die bessere Wahl
bzw. wie realisiere ich das mit Indy
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 12.01.06 15:11 
Moin!

Du mußt das in eine Thread packen. Der könnte dann auch wieder ein Ereignis auslösen, z.B.

cu
Narses
Quake User Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 159



BeitragVerfasst: Sa 14.01.06 02:41 
Dann kann ich nur empfangen und ggf. auf den Timeout warten. Wie unterscheide ich dann aber den Timeout von einem empfangenen Leerstring?

Ein OnData Event würde fallen wenn ich Daten bekomme.
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Sa 14.01.06 14:08 
Moin!

Bei UPD gibt´s keine Signalisierung, aus dem Protokoll kannst du´s also nicht ableiten. Pack halt einen Bool "timeout" in den Event; im Thread weißt du doch, dass einer aufgetreten ist. Oder mach zwei Events, ein OnRecieveData und ein OnTimeout. :wink:

cu
Narses