Autor Beitrag
merlin83
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 89

Win 98, Win 2000, SuSE Linux 9.3 Prof
D7 Personal, D2k5 Personal, Kylix
BeitragVerfasst: Mi 29.06.05 12:36 
Hallo!

Ich möchte mit meinem Programm Text und Dateien über ServerSocket/ClientSocket senden und empfangen. Das Problem ist jetzt, dass ich in meiner OnRead-Methode nicht weiß, was gerade ankommt. Kennt vielleicht jemand eine Funktion, mit der man bei den Sockets prüfen kann, was gerade kommt? Ich will nicht vor her erst übermitteln, was für ein Typ gesendet wird, da das wieder andere Probleme hervorruft.

Vielen Dank im Voraus!

Merlin83

_________________
If ProblemExists=True
Then ProblemExists:=False;
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 29.06.05 13:27 
Sende bevor du Daten empfängst einen eigen code der dir in der read methode angibt welche daten folgen.

code 4711 = stream
code 0815 = text

im read abfrage des codes und etsprechenden read laufen lassen

habe das in einem meiner eigenen TCP Server erfolgreich implementiert und funkt

mfg
MILLI
merlin83 Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 89

Win 98, Win 2000, SuSE Linux 9.3 Prof
D7 Personal, D2k5 Personal, Kylix
BeitragVerfasst: Mi 29.06.05 13:35 
user profile iconmerlin83 hat folgendes geschrieben:
Ich will nicht vor her erst übermitteln, was für ein Typ gesendet wird, da das wieder andere Probleme hervorruft.

_________________
If ProblemExists=True
Then ProblemExists:=False;
direction4delphi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 84

WIN 95, WIN 98, WIN ME, WIN NT, WIN 2000, WIN XP, VISTA
D2 Prof, D4 Prof,D2005 Prof, Delphi4Php
BeitragVerfasst: Mi 29.06.05 13:50 
Sorry mal wieder ungenau gelesen :oops:

mfg
MILLI