一个windows下的socket服务器端程序,接收unix系统发送的数据包时,产生Socket 10053错误,windos发包却正常,求高手看看
socket服务端接收程序如下:procedure TdmMain.IdTCPServer1Execute(AThread: TIdPeerThread);
var
  strlog,strcode:string;
  ileng :integer;
  tmpException: Exception;
begin
  if Athread=nil then exit;
  if Not AThread.Connection.Connected then exit;
  if Athread.Terminated then exit;
  //AThread.Connection.ReadTimeout:= 200; ,加上这句回出现 Read Timeout 得异常
  try    try
     //接收流
      try
          strlog:=AThread.Connection.ReadString(19);
          frmMain.mmo1.Lines.Add('收到数据包,包:'+strlog);
          if strlog <> '' then
          begin
            ileng:=StrToIntDef(trim(LeftStr(strlog,6)),0);
            strcode:=MidStr(strlog,7,7);
          end;
          (AThread.Data as TThreadData).FStrRevc:= athread.Connection.ReadString(ileng);
          frmMain.mmo1.Lines.Add('收到数据包,包:'+(AThread.Data as TThreadData).FStrRevc);
      except
          //返回,解包错误
         MakeErrorXmlStream((AThread.Data as TThreadData).FStrSend);
      end;
      {$IFDEF CONNDATA}
      if ((AThread.Data as TThreadData).FStrRevc = '') or (Length((AThread.Data as TThreadData).FStrRevc) <> ileng) then
      begin
        MakeErrorXmlStream((AThread.Data as TThreadData).FStrSend);
      end
      else
      begin
          //处理接收到的流,并返回要发送的流
          KentDealStream((AThread.Data as TThreadData).FStrRevc ,(AThread.Data as TThreadData).FStrSend);
      end;
      {$ELSE}
      (AThread.Data as TThreadData).FStrSend:=(AThread.Data as TThreadData).FStrRevc;
      frmMain.mmo1.Lines.Add('收到数据包,包:'+(AThread.Data as TThreadData).FStrRevc);
      {$ENDIF}
      //发送流
    //  AThread.Connection.OpenWriteBuffer();       strlog:=inttostr(Length((AThread.Data as TThreadData).FStrSend));
        if Length(strlog) =5 then strlog:=strlog+' '
        else if Length(strlog) =4 then strlog:=strlog+'  '
        else if Length(strlog) =3 then strlog:=strlog+'   '
        else if Length(strlog) =2 then strlog:=strlog+'    '
        else if Length(strlog) =1 then strlog:=strlog+'     '
        else if Length(strlog) >6 then strlog:=leftstr(strlog,6);      (AThread.Data as TThreadData).FStrSend:= strlog+ strcode+'006   '+ (AThread.Data as TThreadData).FStrSend;      AThread.Connection.Write((AThread.Data as TThreadData).FStrSend);
   //   AThread.Connection.CloseWriteBuffer();
    finally    end;
  except
    AThread.Connection.Disconnect;
    tmpException := ExceptObject as Exception;
    oLogfile.addtolog('IdTCPServer1Execute 异常!'
    +' 原因:'+TmpException.Message);
  end;