主题:[讨论]TIdTCPServer 读取数据错误
procedure TFrmtpybx.IdTCPServer_SGIPExecute(AThread: TIdPeerThread);
var
MsgHeader:TMsgHeader;
Command_ID:longword;
begin
FillChar(MsgHeader,sizeof(MsgHeader),0);
try
AThread.Connection.ReadBuffer(MsgHeader,sizeof(MsgHeader));
except
AThread.Connection.Disconnect;
exit;
end;
end;
在读取客户端发过来的数据时,出现下面的错误提示“socket error #10054 cinnection reset by peer”,请各位帮忙找一下原因,我弄了半天也没有找到原因。
var
MsgHeader:TMsgHeader;
Command_ID:longword;
begin
FillChar(MsgHeader,sizeof(MsgHeader),0);
try
AThread.Connection.ReadBuffer(MsgHeader,sizeof(MsgHeader));
except
AThread.Connection.Disconnect;
exit;
end;
end;
在读取客户端发过来的数据时,出现下面的错误提示“socket error #10054 cinnection reset by peer”,请各位帮忙找一下原因,我弄了半天也没有找到原因。