Send string with synapse lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- xinyiman · 2015-05-23 11:40 I'm creating a client server application with Lazarus and synapse. And I must say that almost everything works. I can only understand why using these two pieces of code to send and receive strings sometimes read string dirty data of previous sending and receiving. How can I clean the buffer before sending any string? thanks Code: [Select]function TMyClient.GetString: string; var    buffer: String; begin      buffer:='';      buffer := sock.RecvPacket(6000);      //buffer:=sock.RecvString(6000);      result:=buffer; end;    Code: [Select]function TMyClient.SendString(str: string): boolean; begin      sock.SendString(str); end;