Send HTTP request?
-
HI, all
Im planning to make a flhook plugin to send http request, i found some code for Windows From Application, but they can’t run in flhook….so i want to know how can i do that, give some help please. ;DPS. others about queue and http timeout, i dont want to see flhook and flserver lag when it sending request to a slow http server, how i avoid this problem?
-
you could use socket connections and do use the send and receive function from WIN32_SOCKETS… And you can set the timeout for this socket connection as well…
see http://msdn.microsoft.com/en-us/library/ms740673(VS.85).aspx
dunno if this helps you
-
Thank you Huor, i will try this.
-
You could consider using libcurl http://curl.haxx.se/libcurl/. It’s got a simple programming interface.
-
WOW, Thank you very much Cannon.
-
PS. others about queue and http timeout, i dont want to see flhook and flserver lag when it sending request to a slow http server, how i avoid this problem?
When you need to send a request, shove it in a queue handled by another thread
It gets a bit complicated when you need to react on replies, but there should be loads of stuff on threading & queuing on the web… try codeproject or codeguru.
-
Thanks for reply, i has successful post HTTP request via libcurl.dll, and looks slow http will not lag the server ;D
1/7