Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtHttpClient.Cancel

procedure Cancel;
Cancel is safe from another thread. It stays in force: the running request and every later one raise eHttpError until ResetCancel, which must be called only while no request is running. With a deadline (RequestTimeout or DeadlineTick) the DNS lookup and the TCP connect are bounded by Timeout and the deadline, and the system DNS lookup ends at once on Cancel: it is abandoned rather than stopped, and finishes on its own thread with its answer discarded (stSocket.LookupHostWithin). The send and receive waits look at cancellation in short slices. A TCP connect, a lookup over TCP to DnsServers, and any lookup of a request without a deadline run to their end or their bound first.