Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cTlsSocket does not fire OnConnect #13

Open
MindChild opened this issue Jan 12, 2021 · 1 comment
Open

cTlsSocket does not fire OnConnect #13

MindChild opened this issue Jan 12, 2021 · 1 comment

Comments

@MindChild
Copy link

cTlsSocket does not fire OnConnect when connected, however the underlying class cAsyncSocket does fire OnConnect. The encapsulating cTlsSocket isn't completely ready at that moment, so it can't be used as an indicator.

This is using mdTlsThunks. mdTlsNative doesn't appear to work at all. I will make another issue report for it

@wqweto
Copy link
Owner

wqweto commented Jan 13, 2021

Can you open test\Secure\Project1.vbp project and place a breakpoint on m_oSocket_OnConnect in Form2 to confirm it's not being raised?

Btw this works for me with all backends

Option Explicit

Private WithEvents m_oSocket As cTlsSocket

Private Sub Form_Load()
    Set m_oSocket = New cTlsSocket
    m_oSocket.Connect "www.google.com", 443
End Sub

Private Sub m_oSocket_OnConnect()
    Debug.Print "m_oSocket_OnConnect", m_oSocket.RemoteHostName, Timer
End Sub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants