I was wondering if you could help me on checking if the server is started or not.

so that I can make a offline/online function..

I have tried this:
Winsock1.Connect "192.168.46.12", "8866"
but don’t know what to do now, I don’t know if the connection is made or not.

How can I check that?