onwork hab ich ja schon probiert: wird nicht aufgerufen
da hab ich ja auch ein application.processmessagesdrin
so hab jetzt mal ein
DoWork(wmWrite, AByteCount);
TIdAntiFreezeBase.DoProcess(False);
in writebuffer hinzugefügt...geht jetzt schön sauber
aber nach der übertragung hängt er ne gane weile hier:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8:
| procedure TIdTCPConnection.GetInternalResponse; var LLine: string; LResponse: TStringList; LTerm: string; begin LResponse := TStringList.Create; try LLine := ReadLnWait; |
kann ich das umgehen? der macht das um zu wissen, ob die übertragung ok war
edit:
hasb weiter eingegrenzt:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35:
| function TIdSocketHandle.Readable(AMSec: Integer = IdTimeoutDefault): boolean;
function CheckIsReadable(AMSec: Integer): Boolean; var ReadList: TList; begin if not FHandleAllocated then begin raise EIdConnClosedGracefully.Create(RSConnectionClosedGracefully); end;
ReadList := TList.Create; try ReadList.Add(Pointer(Handle)); Result := GStack.WSSelect(ReadList, nil, nil, AMSec) = 1; TIdAntiFreezeBase.DoProcess(Result = False); finally ReadList.Free; end; end;
begin if TIdAntiFreezeBase.ShouldUse then begin if AMSec = IdTimeoutInfinite then begin repeat Result := CheckIsReadable(GAntiFreeze.IdleTimeOut); until Result; Exit; end else if AMSec > GAntiFreeze.IdleTimeOut then begin Result := CheckIsReadable(AMSec - GAntiFreeze.IdleTimeOut); if Result then begin Exit; end else begin AMSec := GAntiFreeze.IdleTimeOut; end; end; end; Result := CheckIsReadable(AMSec); end; |