property LineMode: boolean;
If set to true, LineMode enables automatic splitting of received data into packets based on a user definable char sequence.
If the client always sends data lines terminated with CR/LF and the server shall display the lines individually in a memo, the server would set LineMode to true so the caller always receives complete lines without needing to search for the end of line.
Socket.LineLimit:=100; // prevent denial of service or buffer // overflows Socket.LineEnd:=chr(10) + chr(13); // the sender has to terminate all // messages sent with this character // combination Socket.LineMode:=true;
In OnDataAvailable ReceiveStr is used to fetch the available data packet by packet.
Always set LineLimit to prevent buffer overflows.