Hey everybody,
I am pretty new to the whole visual basic scene, but I am very interested. So far, I have read 2 full tutorials on vbworld.com by Karl Moore.
He is my question.
I have read half of the Winsock tutorial and made the two programs; the receiver and sender.
here is the code....
Sender:


Private Sub Command1_Click()
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.RemotePort = 1008
Winsock1.RemoteHost = "192.168.1.0, also tried 127.0.0.1, and 192.168.1.1"
Winsock1.Connect
Do Until Winsock1.State = sckConnected
DoEvents: DoEvents: DoEvents: DoEvents
If Winsock1.State = sckError Then
MsgBox "Problem connecting!"
Exit Sub
End If
Loop
Winsock1.SendData (txtMessage.Text)
Winsock1.Close
End Sub

The receiver:

Private Sub form_load()
Winsock1.LocalPort = 1008
Winsock1.Listen
End Sub

Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
If Winsock1.State <> sckClosed Then Winsock1.Close
Winsock1.Accept requestID
End Sub


Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim strIncoming As String
Winsock1.GetData strIncoming
MsgBox strIncoming
End Sub


The problem is it doesn't work... Whenever I try to send a message it gives me the sckerror.
I have a network over a linksys router, and I tried both over the network and over one computer.
Both tries failed.
If anyone could be kind enough to help me out here, I would greatly appreciate it.

Thanks in advance.