Class THttpAsyForm (unit HttpAsy1) |
Inherits from
TForm
procedure AbortButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Abort all the running request.
procedure AddButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Add an URL to the URL list box
procedure ClearDisplayButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ExecButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Execute button click handler.
procedure FormClose(Sender: TObject; var Action: TCloseAction);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure FormCreate(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure FormShow(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure HttpCli1DocData(Sender: TObject; Buffer: Pointer;
Len: Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnDocData event handler is used in both sequential and } { simultaneous requests models.
procedure HttpCli1HeaderData(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnHeaderData event handler is used in both sequential and } { simultaneous requests models.
procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest;
Error: Word);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnRequestDone event handler is called during the sequential model.
procedure RemoveButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Remove the selected URL from hte URL listbox
procedure ReplaceButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure URLListBoxClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ExecSequential;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ExecSimultaneous;
For sequential requests * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Start simultaneous execution by creating as much THttpCli components as } { there are URL in the list box.
procedure HttpCliItemRequestDone(Sender: TObject; { For simult. requests }
RqType: THttpRequest; Error: Word);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnRequestDone handler is used for the simultaneous request model.
procedure StartNext;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Start the next request (this could also be the first).
AbortButton : TButton;
AddButton : TButton;
ClearDisplayButton : TButton;
DataCheckBox : TCheckBox;
DisplayMemo : TMemo;
ExecButton : TButton;
HeaderCheckBox : TCheckBox;
HttpCli1 : THttpCli;
Label1 : TLabel;
Panel1 : TPanel;
Panel2 : TPanel;
RemoveButton : TButton;
ReplaceButton : TButton;
SimultCheckBox : TCheckBox;
URLEdit : TEdit;
URLListBox : TListBox;
FCurrentItem : Integer;
FFlagAbort : Boolean;
For simultaneous requests
FHttpCliList : TList;
FIniFileName : String;
FInitialized : Boolean;
Déclarations privées
procedure AbortButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Abort all the running request. } { In the simultaneous model, we use the list to abort all. } { We just need to call abort. We will get the OnRequestDone event with an } { error code stating that the request has been aborted.
procedure AddButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Add an URL to the URL list box
procedure ClearDisplayButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ExecButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Execute button click handler. Start sequential or simultaneous execution
procedure FormClose(Sender: TObject; var Action: TCloseAction);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure FormCreate(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure FormShow(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure HttpCli1DocData(Sender: TObject; Buffer: Pointer;
Len: Integer);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnDocData event handler is used in both sequential and } { simultaneous requests models.
procedure HttpCli1HeaderData(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnHeaderData event handler is used in both sequential and } { simultaneous requests models.
procedure HttpCli1RequestDone(Sender: TObject; RqType: THttpRequest;
Error: Word);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnRequestDone event handler is called during the sequential model. } { Just start the next request.
procedure RemoveButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Remove the selected URL from hte URL listbox
procedure ReplaceButtonClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure URLListBoxClick(Sender: TObject);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ExecSequential;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
procedure ExecSimultaneous;
For sequential requests
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Start simultaneous execution by creating as much THttpCli components as } { there are URL in the list box. (We could alternatively limit the number } { of THttpCli components and use them sequentially. It would be a } { combination of the sequential and simultaneous implementations.) } { A TList is used to keep track of all the component created. This is only } { needed to abort each one if requested by the user. } { The Tag property is used to store the item number, just for display.
procedure HttpCliItemRequestDone(Sender: TObject; { For simult. requests }
RqType: THttpRequest; Error: Word);
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { This OnRequestDone handler is used for the simultaneous request model. } { It search the THttpCli component in the list and remove it.
procedure StartNext;
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} { Start the next request (this could also be the first).
AbortButton : TButton;
AddButton : TButton;
ClearDisplayButton : TButton;
DataCheckBox : TCheckBox;
DisplayMemo : TMemo;
ExecButton : TButton;
HeaderCheckBox : TCheckBox;
HttpCli1 : THttpCli;
Label1 : TLabel;
Panel1 : TPanel;
Panel2 : TPanel;
RemoveButton : TButton;
ReplaceButton : TButton;
SimultCheckBox : TCheckBox;
URLEdit : TEdit;
URLListBox : TListBox;
FCurrentItem : Integer;
FFlagAbort : Boolean;
For simultaneous requests
FHttpCliList : TList;
FIniFileName : String;
FInitialized : Boolean;
Déclarations privées