Justa Lol
Nov 1st, 2009, 11:49 AM
whenever i try this i get an error:
"Runtime error 40006
Wrong protocol or connection state for the requested transaction or request"
could someone tell me whats wrong with this code?
Dim MessageIn As String
Dim MessageOut As String
Private Sub Command1_Click()
MessageOut = txtOut
Winsock1.SendData MessageOut
End Sub
Private Sub Form_load()
Winsock1.RemoteHost = "localhost"
Winsock1.RemotePort = "65256"
Winsock1.Connect
Winsock2.LocalPort = "65256"
Winsock2.Listen
End Sub
Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
Winsock2.GetData MessageIn
txtIn = txtIn & MessageIn & vbNewLine
End Sub
"Runtime error 40006
Wrong protocol or connection state for the requested transaction or request"
could someone tell me whats wrong with this code?
Dim MessageIn As String
Dim MessageOut As String
Private Sub Command1_Click()
MessageOut = txtOut
Winsock1.SendData MessageOut
End Sub
Private Sub Form_load()
Winsock1.RemoteHost = "localhost"
Winsock1.RemotePort = "65256"
Winsock1.Connect
Winsock2.LocalPort = "65256"
Winsock2.Listen
End Sub
Private Sub Winsock2_DataArrival(ByVal bytesTotal As Long)
Winsock2.GetData MessageIn
txtIn = txtIn & MessageIn & vbNewLine
End Sub