| |
|
|
| aHttpDw: Asynchrones* Send and loading by HTTP
*(in the Ggs. to that synchonen loading without, that the XProfan-Program wait, To The operation exits is)
at that Weiterentwickeln of Gonzo-Chat [...] was me quick clear, that withal optimization the prozesssynchonen HTTP-Datenbeziehens (z.B. over simple [...] ), me störende Auszeiten the UI not prevented go can.
One (in the reference to that XProfan-Thread which The surface and Interaktionen darstellt) asynchrones relating the data had since. The XProfan has here in the principle following Opportunities, there XProfan of House from not allows, over further Threads inside the same Prozesses further XProfanablaufstränge abzuarbeiten:
A) Zweiprozess-Variante: One Process position The UI ready and a zweiter Process The synchone Datenkommunikation. both processes communicate asynchron together (z.B. over these Pipes: [...] )
B) Einprozess-Mehrthread-Variante: The XProfanprozess runs How had and läd a DLL (can also by Inline-ASM created go) and the DLL created self-employed administering Nebenthreads. DLL must interface for XProfan-Process afford, data asynchron To relating and To Send.
Variante A has to Variante B whom disadvantage, that these memory- and performance-lastiger is, but whom benefit, that these explicit plainer program go can.
Variante B needed none own/further Process separate only Threads. These Variante have I yesterday for/because of Gonzo program, The aHttpDw.Inc was created.
The aHttpDw.Inc contain The aHttpDw.DLL which Specifically for aHttpDw.Inc program is, one Operate the aHttpDw.Dll without The Include isn't possible since the Include modes for DLL provides.
objectively can with the Include but not only Downloaded go, without the that XProfanprogramm "stoppt", separate it can "zeitgleich" as much as you want Downloads in order given go, which any "zeitgleich" worn out go. If one so will, then could one it as "Downloadmanager" verkennen.
The Include position in the Grunde two important Opportunities ready:
aHttpDw(string url)
places on the Abarbeitungsstapel The URL url and begins immediate The data To loading. Zurückgegeben becomes The number the next-disengaged SLOT (lever) which later using becomes, if The data entire receive get. it can hierüber as much as you want send/load-Aufträge discontinued go.
and
aHttpDw.frame()
If a File entire Downloaded watts, or. The Reply Server entire receive watts, then gives aHttpDw.frame whom SLOT back, otherwise zero. About The Slotnummer comes one then simply on The response. (Binary-Safe)
with aHttpDw(url) vergibt one means whom order, and over aHttpDw.frame() can asynchron/irregular nachschauen, whether Perhaps already a File entire loaded watts.
The data stand means then available, if one thereafter asks (asynchron) and the Downloads bearing whom Hauptthread the XProfan not.
i'll but first of all to Include (here) a couple Testprogramme post. one of it becomes even too Gonzo his. |
|
|
| |
|
|