send and recive TStringStream with indyTcp server and client
问题 I am trying to send a TStringStream from client to server, then send it back from server to client, using Indy TCP components. Here is my client code: var Jpg: TJPEGImage; StringStream: TStringStream; strcams, StringImageData: String; byt, i: integer; procedure SendCommandWithParams(Command, Params: String); begin Lock; try if not FTCP.Connected then begin exit; end; FTCP.Socket.WriteLn('1' + Command, IndyTextEncoding_UTF8); FTCP.Socket.WriteLn(Params, IndyTextEncoding_UTF8); finally Unlock;