It is currently Sun May 31, 2020 1:14 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: [Done] ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 7:02 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4714
Location: Germany
At least in the german help it is written that if #PB_HTTP_Asynchronous is used with ReceiveHTTPMemory(),
that FinishHTTP() returns the *Buffer.

But in the help of FinishHTTP() it is only written that it returns the downloaded bytes.

So maybe the help of FinishHTTP is wrong / not complete.

PB 5.72


Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 11:48 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2477
Location: Germany
Also read the small printed one :wink:
Quote:
If the download has been successful, it returns the number of bytes written to disk for a download start with ReceiveHTTPFile(), or the memory buffer address for a download started with ReceiveHTTPMemory().


Translation not entirely accurate or clear.
Quote:
Wenn der Download erfolgreich war, werden die Anzahl an Bytes zurückgegeben, die bei einem mittels ReceiveHTTPFile() gestarteten Download auf Disk bzw. bei einem mittels ReceiveHTTPMemory() gestarteten Download an die Speicheradresse geschrieben wurden.

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Last edited by mk-soft on Wed May 20, 2020 11:58 am, edited 3 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 11:56 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4714
Location: Germany
This means that the german help is not correct.

The german help says that only the received bytes came as result.


Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 11:59 am 
Offline
Addict
Addict
User avatar

Joined: Fri May 12, 2006 6:51 pm
Posts: 2477
Location: Germany
KI Translation
Quote:
Wenn der Download erfolgreich war, gibt er die Anzahl der Bytes zurück, die für einen Download-Start mit ReceiveHTTPFile() auf die Festplatte geschrieben wurden, oder die Speicherpufferadresse für einen Download, der mit ReceiveHTTPMemory() gestartet wurde.

Sorry Andre, In diesen fall war die KI DeepL.com besser

_________________
My Projects ThreadToGUI / OOP-BaseClass / OOP-BaseClassDispatch / EventDesigner V3
PB v3.30 / v5.70 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace


Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 9:15 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1831
Location: Germany (Saxony, Deutscheinsiedel)
mk-soft wrote:
KI Translation
Quote:
Wenn der Download erfolgreich war, gibt er die Anzahl der Bytes zurück, die für einen Download-Start mit ReceiveHTTPFile() auf die Festplatte geschrieben wurden, oder die Speicherpufferadresse für einen Download, der mit ReceiveHTTPMemory() gestartet wurde.

Sorry Andre, In diesen fall war die KI DeepL.com besser

I don't have a problem with suggestions for better docs, or - in this case - better (right) german translations ;-)

But looking again on the english original docs I would suggest the following german translation:
Quote:
Wenn der Download erfolgreich war, wird folgendes zurückgegeben:
- die Anzahl an Bytes, die für einen mittels ReceiveHTTPFile() gestarteten Download auf Disk geschrieben wurden, bzw.
- die Speicherpuffer-Adresse bei einem mit ReceiveHTTPMemory() gestarteten Download.

I think this makes it more clear, that there are two options, and avoid too long sentences (which could be mis-interpreted then).
What do you think?

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 9:31 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 28, 2003 12:01 am
Posts: 511
Other suggestion:
Quote:
Abhängig davon, mit welchem Recieve-Befehl der Download gestartet wurde, gibt FinishHTTP() folgendes zurück:
  • ReceiveHTTPFile():
    Anzahl der empfangenen Bytes (Größe der gespeicherten Datei).
  • ReceiveHTTPMemory():
    Adresse des Speicherbereichs, ab der die empfangenen Daten gespeichert wurden.
    Mit MemorySize(Adresse) kann die Anzahl der empfangenen Daten ermittelt werden.

_________________
Windows 10 / Windows 7
PB Last Final / Last Beta Testing


Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 9:39 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1831
Location: Germany (Saxony, Deutscheinsiedel)
@helpy: good suggestions, german docs changed :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 9:45 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jun 28, 2003 12:01 am
Posts: 511
Suggestion for english help:
Quote:
Depending on which Recieve command was used to start the download, FinishHTTP() returns one of the following results:
  • ReceiveHTTPFile():
    Amount of received bytes (size of the stored file).
  • ReceiveHTTPMemory():
    Address of the memory area where the received data was stored.
    With MemorySize(Address) the amount of received data can be determined.

_________________
Windows 10 / Windows 7
PB Last Final / Last Beta Testing


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 10:04 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1831
Location: Germany (Saxony, Deutscheinsiedel)
English docs adapted too, thank you!

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 10:09 pm 
Offline
Addict
Addict
User avatar

Joined: Sat Oct 17, 2009 10:51 pm
Posts: 1371
Location: Nashville
Andre: Thank you for all of the hard work you do keeping the help docs up to date and and maintaining your site.


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Wed May 20, 2020 10:15 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1831
Location: Germany (Saxony, Deutscheinsiedel)
Kuron wrote:
Andre: Thank you for all of the hard work you do keeping the help docs up to date and and maintaining your site.

Thank you for the compliment! :D

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Thu May 21, 2020 10:15 am 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4714
Location: Germany
Hm...

I think it should be mentioned that this is only valid if #PB_HTTP_Asynchronous is used with ReceiveHTTPMemory()


Top
 Profile  
Reply with quote  
 Post subject: Re: [Done] ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Thu May 21, 2020 9:28 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1831
Location: Germany (Saxony, Deutscheinsiedel)
infratec wrote:
I think it should be mentioned that this is only valid if #PB_HTTP_Asynchronous is used with ReceiveHTTPMemory()

Ok, would you suggest to write then:
Quote:
Depending on which Receive command was used to start the download, FinishHTTP() returns one of the following results:
ReceiveHTTPFile(): Amount of received bytes (size of the stored file).
ReceiveHTTPMemory(): (only if #PB_HTTP_Asynchronous was used with it)
Address of the memory area where the received data was stored. With MemorySize() the amount of received data can be determined then.

(The bold command name will by a hyperlink to the related chapter in the PB manual.)

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Thu May 21, 2020 10:26 pm 
Offline
Addict
Addict

Joined: Sun Sep 07, 2008 12:45 pm
Posts: 4714
Location: Germany
english:
Quote:
Depending on which Receive command was used to start the download, FinishHTTP() returns one of the following results:
ReceiveHTTPFile(): Amount of received bytes (size of the stored file).
ReceiveHTTPMemory() if #PB_HTTP_Asynchronous flag is used:
Address of the memory area where the received data was stored. With MemorySize() the amount of received data can be determined then.


deutsch:
Quote:
Abhängig davon, mit welchem Recieve-Befehl der Download gestartet wurde, gibt FinishHTTP() folgendes zurück:

ReceiveHTTPFile():
Anzahl der empfangenen Bytes (Größe der gespeicherten Datei).
ReceiveHTTPMemory() mit gesetztem #PB_HTTP_Asynchronous Flag:
Adresse des Speicherbereichs, ab der die empfangenen Daten gespeichert wurden.
Mit MemorySize(Adresse) kann die Anzahl der empfangenen Daten ermittelt werden.


Top
 Profile  
Reply with quote  
 Post subject: Re: ReceiveHTTPMemory() -> FinishHTTP()
PostPosted: Thu May 21, 2020 11:20 pm 
Offline
PureBasic Team
PureBasic Team
User avatar

Joined: Fri Apr 25, 2003 6:14 pm
Posts: 1831
Location: Germany (Saxony, Deutscheinsiedel)
Ok, changed again. So now really finished :-)

_________________
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye