wqweto / VbAsyncSocket

Sockets with pure VB6 impl of TLS encryption
MIT License
164 stars 31 forks source link

non-blocking socket could not be completed immediately cHttpRequest #48

Closed surfer-silver closed 1 month ago

surfer-silver commented 1 month ago

test project Basic raises this error in latest release

wqweto commented 1 month ago

image

HttpDownload button works here both with rate limit and without one in both IDE and compiled.

surfer-silver commented 1 month ago

thank your for your prompt reply... it was my mistake ... it is for [HTTP Request] Sir... i tried your example manipulated but same ... but [cTlsSocketHTTPS] working ok. trying to connect with https://ipinfo.io same error even tried given links no success your work is just mind blowing it mesmerizes me

wqweto commented 1 month ago

Can you prepare a failing project?

I'm testing with latest HttpRequest.dll this code

Option Explicit

Private Sub Form_Load()
    With New cHttpRequest
        .Open_ "GET", "https://ipinfo.io/json"
        .Send
        Debug.Print .ResponseText
    End With
End Sub

... and it works here.

Try downloading and testing with latest HttpRequest.zip from Releases section.

surfer-silver commented 1 month ago

tested with cHttpRequest class in Basic sample project, that means no use of cHttpRequest class

wqweto commented 1 month ago

Ok, in /test/Basic/Project1.vbp I just changed Command2 event Click to this

Private Sub Command2_Click()
    With New cHttpRequest
        .Open_ "GET", "https://ipinfo.io/json"
        .Send
        Debug.Print .ResponseText
    End With
End Sub

. . . and it works here on clicking HTTP Request button.

Btw, similar to your problem was fixed in commit 3935cfcb4823b30a2f1f0571facc683f8581afa3 about 3 weeks ago.

surfer-silver commented 1 month ago

i already did this.. but again i download sourcecode... removed previous extract , i am using the Basic project class as already used there.

change as per above and boom same error here is the conditional ASYNCSOCKET_NO_TLSSERVER = 1 : USE_DEBUG_LOG = 1 : USE_TLS = 1 : Dummy = 1

see screen shot image

other than this can you please guide me to use github with vb6 properly (i know its not the right path only way to communicate)

wqweto commented 1 month ago

Can you put a breakpoint on cHttpRequest.pvSetError method and when it gets hit post screenshot of the call-stack dialog (Ctrl+L)?

surfer-silver commented 1 month ago

without changing anything screenshot 1 image

with other included locals too image

wqweto commented 1 month ago

Weird. It looks like you are not using the latest version of cHttpRequest.cls -- the code is currently different for line 1337 with the fix in commit 3935cfcb4823b30a2f1f0571facc683f8581afa3 I already mentioned above.

surfer-silver commented 1 month ago

running perfectly... just downloaded the released version ... thought all changes merged in released version provided ... now lesson learned for future

if possible, please share your experience of using git hub with vb6 it will help so many people as you can see the result just because of github again thanks alot for such wonderfull code

wqweto commented 1 month ago

There are GUI clients like GitHub Desktop or Sourcetree which make life easier in the beginning.