I have problem with sockets.
If i send more then two lines of text using TClientSocket then server receives one line instead of two.
Client part:
ClientSocket1.Socket.SendText(Edit1.Text);//Text is 'Line1'
ClientSocket1.Socket.SendText(Edit2.Text);//Text is 'Line2'
Server part:
var
s: String;
begin
s := Socket.ReceiveText;
Memo1.Lines.Add(S);
The Memo1 created line is ‘Line1Line2’
Why?
Sorry for my english!
SendTextdoes not send a CRLF. If you need to send a new line, you’ll have to do it explicitly: