Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have a school project to develop an application that can chat using IP addresses and port number. I ahve chosen Visual Basic because of the WINSOCK control that helps in the TCP connection. MY problem now is that whenever I try to connect to the remote system using its IP address, I flags error 40006, Wrong Protocol or connection state. Please I need help here.
Olumode

Ok, I'll just take a look at your code..
...Hmm..You seem to be missing something...AKhalifman@hotmail.com

The winsock control can be slightly esoteric.
You need to do this (in the server app) under the Connection Reguest
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
' This is Server Socket Code
Winsock1.Close
Winsock1.Accept requestID
End Sub
And this is for the client:
Private Sub Winsock1_Close()
' Client Code
Winsock1.Close
End Sub
Also, if you ARE doing both of these things, then you might need to check your Protocol, there are two protocols you can use.I hope this helps.
ChiBTW: The WinSock Control is pretty good, but Sockets in .NET roxor!
"They mostly come at night...mostly"

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |