Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Http
#8
To add timeout, other thread must close one of internet handles. Example:
Macro
Code:
Copy      Help
out
Http+ g_h.Connect("www.quickmacros.com")
ARRAY(POSTFIELD) a.create(1)
a[0].name="a"; a[0].value=1
tim 5 tim_Http_PostFormData
g_h.PostFormData("form2.php" a _s)
0.01; if(!g_h.IsConnected) end "timeout"
tim 0 tim_Http_PostFormData
g_h.Disconnect
out _s

Function tim_Http_PostFormData
Code:
Copy      Help
tim
g_h.Disconnect

Member function Http.IsConnected
Code:
Copy      Help
function!

ret m_hi!0

This is not thread-safe code.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)