Cannot get appropriate Event fired with WinSock control

T

Tetsuya Oguma

Hello all,

My WinSock control (MSWINSOCK.ocx - Microsoft WinSock
Control 6.0 (SP5)) is behaving not well, to put my issue
kindly...

I am having a problem of getting Events fired after my
WinSock client control is connected to the server.

As soon as my WinSock client fires Connect method, either
Connect() or Error() Event should fire. This doesn't
simply happen... It just hangs right there...

THe snippet of my code is as follows:

With sckSocket
.Protocol = sckTCPProtocol
.RemoteHost = m_Host
.RemotePort = m_Port
.Connect
Debug.Print .State 'gives me 7 for Connected
Debug.Print .RemoteHostIP 'gives me the right IP
address of the server I want to connect to
End With

Does anyone have any idea why???

Thanks for your time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top