hi, benutz am besten die
indy komponente IDTCPClient/IDTCPServer...
Client:
Connecten
idtcpclient1.connect;
senden
idtcpclient1.writeln('...');
empfangen
variable :=idtcpclient1.readln;
Server:
öffnen
idtcpserver.actice :=true;
senden
athread.connection.writeln('...');
empfangen
athread.connection.readln('...')