I can't make a connect between to computers! The winsock state is 6...I can't make it go 7!
This is the program, which is sending data:
This is the program, which is recieving the data:Code:Private Sub cmdSend_Click() On Error GoTo error Debug.Print Winsock1.State Winsock1.SendData SendData.Text Exit Sub error: MsgBox "Error!" End Sub Private Sub Form_Load() Winsock1.Connect "1.0.0.2" Debug.Print Winsock1.State End Sub Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long) Winsock1.Bind End Sub
What is wrong???Code:Private Sub Command1_Click() On Error GoTo error Winsock1.Bind Exit Sub error: MsgBox "Error!" End Sub Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long) Winsock1.Bind End Sub Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim Data Winsock1.GetData Data, vbString MsgBox Data End Sub




Reply With Quote