Send Record Via ICS (Internet Component Suite) Delphi
i want to send record with ICS (Internet Component Suite) from client to server i have a record
PIPCDataPhone = ^TIPCDataPhone;
TIPCDataPhone =开发者_如何学编程 record
cmd: string[15];
Mode: Integer;
end;
i want to sent that record to server using the protocol TCP
thanks
This focuses on Indy suite of components but please look here at the principle.
Basically, you need to write your record to the socket buffer, telling it how big it is. then on the receive side, you receive the sent number of bytes and cast it to the record type.
http://delphi.about.com/od/internetintranet/l/aa020403a.htm
try
TClientSocket.socket.sendstream
but in this case you will have to manage the sent data, and the memory.
精彩评论