idtcpserver发idtcpclient收发数据
//服务端
AContext.Connection.IOHandler.ReadStream(stream); AContext.Connection.IOHandler.Write(stream2, stream2.Size, True); //客户端 function Tfrmdm.GetServerTime: TDateTime; begin // connect server if not IdTCPClient1.Connected then IdTCPClient1.Connect; IdTCPClient1.IOHandler.Write(FSendStream, FSendStream.Size, true); // recv server's data IdTCPClient1.IOHandler.ReadStream(FRecvStream); IdTCPClient1.Disconnect; end;
标签:IOHandler,idtcpserver,Write,收发,idtcpclient,IdTCPClient1 From: https://www.cnblogs.com/hnxxcxg/p/16894756.html