PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197

PHP User Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: bbcode_highlight in ..../includes/functions.php on line 4197
[RESOLVED] WinHTTP 5.1 class wrapper-VBForums
Results 1 to 27 of 27

Thread: [RESOLVED] WinHTTP 5.1 class wrapper

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2011
    Posts
    461

    Resolved [RESOLVED] WinHTTP 5.1 class wrapper

    ORIGINAL TITLE: clsHttpRequests


    I was searching for the proper class which supports HTTPS protocol and threading, and found this. It turned out that it's the best solution, but... I have realized that it doesn't support per-thread proxy and I need that for my project, so I contacted the author to send me the latest version. I have attached it to this post now (with simple test project included).
    However, the function that I've mentioned above isn't implemented yet, and the class has timeout bug. The author said to me that currently he has no time to fix that, but he gave me some notes to do that by myself:
    Quote Originally Posted by Cocus
    Well, I've checked some info about the timeout issue. It seems to be a bug related to the InternetSetOption API. I should re-add the timers in the class to fire the timeout event. I'll do that eventually, but not right now. If you really need that, you can call CancelRequest with a VB timer.
    Also the proxy stuff will be done, but not in the meantime, since I'm doing another projects not related to this one.
    If you want to experiment, try to "copy" all the code from InitInternetConnection to SendRequest_OptionalAsByte, so each thread has its own "internet connection handle". After that, you can add another field in the "tThreadInfo" UDT, so the Internet Connection handle can be stored there and freed up when thread finishes (so you don't leak any handles). Also check for the "DestroyRemainingThreads", which also frees up handles.
    Since I'm not expert in that field and I don't think that I'll ever succeed in making it possible, I want to ask if anyone here who is experienced enough is ready to try this challenge (I hope that it's not so hard), not only for me but also for the benefit of others who will eventually use it someday? Thanks in advance!
    Attached Files Attached Files
    Last edited by MikiSoft; Feb 17th, 2015 at 09:38 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width