Using HTTPSecureSocket.SendProgress event to drive a simple ‘% of transfer complete’ UI control appears to be broken.
To be more specific, create a very simple subclass of HTTPSecureSocket called HTTPSecureSocket_e2.
Then run the following code in a pushbutton action event, and monitor the SendProgress event firing:
[code] object1=new HTTPSecureSocket_e2
object1.yield=true
object1.secure=true
object1.connectionType=object1.TLSv12
dim dat as string = “TEST”
do until dat.lenb>20000000
dat=dat+dat
loop
object1.SetRequestContent dat,“application/x-www-form-urlencoded”
object1.post"https://httpbin.org/post"[/code]
Problem :
SendProgress fires a few hundred times in the first second, and then nothing happens for 30 seconds while the data is actually sending.
So any ‘% of transfer complete’ UI message goes to 100% almost instantly, and remains there for the entire duration of the send.
However, for non-secure uploads, HTTPSocket.SendProgress works perfectly well.
Has anyone managed to make this work for subclasses of HTTPSecureSocket?