首先都要发送stream.Size, 这是必须的。
// 服务端
AThread.Connection.WriteInteger(stream2.Size);
AThread.Connection.WriteStream(stream2);
// 客户端
IdTCPClient1.WriteInteger(FSendStream.Size);
IdTCPClient1.WriteStream(FSendStream);
时间: 2024-11-13 08:01:41
首先都要发送stream.Size, 这是必须的。
// 服务端
AThread.Connection.WriteInteger(stream2.Size);
AThread.Connection.WriteStream(stream2);
// 客户端
IdTCPClient1.WriteInteger(FSendStream.Size);
IdTCPClient1.WriteStream(FSendStream);