Hi, guys,
I am real-new to winsock. I am experimenting the following VB winsocket program. The problem is the client socket never gets to sckConnected state, always in sckConnecting. So .sendData() always give out "wrong protocol or connection state for the requested transaction or request."
I would believe my server side is fine. I have a Java socket program that can send messages to and recieve messages from my VB socket server with no error. I can post the server code if needed.
Please help me out. Really frustrated. Thanks a lot in advance.
=======================================================
Private Sub Form_Load()
clientSocket.RemoteHost = "localhost"
clientSocket.RemotePort = 6000
End Sub
Private Sub SendBtn_Click()
clientSocket.Connect
'doesn't work even if I put wait here.
clientSocket.SendData "Test message from VB client"
clientSocket.Close
End Sub
I am real-new to winsock. I am experimenting the following VB winsocket program. The problem is the client socket never gets to sckConnected state, always in sckConnecting. So .sendData() always give out "wrong protocol or connection state for the requested transaction or request."
I would believe my server side is fine. I have a Java socket program that can send messages to and recieve messages from my VB socket server with no error. I can post the server code if needed.
Please help me out. Really frustrated. Thanks a lot in advance.
=======================================================
Private Sub Form_Load()
clientSocket.RemoteHost = "localhost"
clientSocket.RemotePort = 6000
End Sub
Private Sub SendBtn_Click()
clientSocket.Connect
'doesn't work even if I put wait here.
clientSocket.SendData "Test message from VB client"
clientSocket.Close
End Sub