Class TUrlAsynchronousReader
Unit
CastleDownload
Declaration
type TUrlAsynchronousReader = class(TObject)
Description
Implement this class, and pass to RegisterUrlProtocol, to read protocols asynchronously (such that TCastleDownload can read them asynchronously).
There is no point in using this class unless you want to handle custom URL protocols. If you just want to download asynchronously from standard URLs, like file or http, then use TCastleDownload class.
Hierarchy
- TObject
- TUrlAsynchronousReader
Overview
Fields
Methods
Description
Fields
 |
Url: String; |
Fields set before Start is called. Should not be modified by this instance after Start.
|
 |
ForceSynchronous: Boolean; |
|
 |
HttpPostData: TStrings; |
|
 |
HttpHeadersKeys: TStrings; |
|
 |
HttpHeadersValues: TStrings; |
|
 |
DownloadedBytes: Int64; |
|
 |
TotalBytes: Int64; |
|
 |
Contents: TStream; |
Not owned by this instance, TCastleDownload takes care of freeing this.
|
 |
ErrorMessage: String; |
When Status = dsError, download failed with this error.
|
 |
HttpResponseCode: Integer; |
|
 |
HttpResponseHeaders: TStrings; |
In case of HTTP(S) requests, HTTP response code.
|
 |
FinalUrl: String; |
In case of HTTP(S) requests, this must contain HTTP response headers.
|
Methods
 |
procedure Start; virtual; |
Start downloading, called when TCastleDownload.Start is called.
Note for descendant implementors: Exceptions raised inside this will make an actual exception from TCastleDownload.Start. In case of normal download failure, e.g. file (or HTTP resource) doesn't exist (so it is not some bug in code), this method should set Status to dsError and not raise an exception.
|
 |
procedure Update; virtual; |
Called continuously to push the download further.
Note for descendant implementors: Exceptions raised inside this will make an actual exception (from undefined place, for now ApplicationProperties._Update, called by TCastleWindow and TCastleControl). In case of normal download failure, e.g. file (or HTTP resource) doesn't exist (so it is not some bug in code), this method should set Status to dsError and not raise an exception.
|
Generated by PasDoc 0.16.0.