Server:
Private Sub Form_Load()
intmax = 0
tcpServer(0).LocalPort = 1001
tcpServer(0).Listen
End Sub
Private Sub tcpServer_ConnectionRequest(Index As Integer, ByVal requestID As Long)
If Index = 0 Then
intmax = intmax + 1
Load tcpServer(intmax)
tcpServer(intmax).Accept requestID
Load txtData(intmax)
End If
End Sub
Private Sub tcpServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim strData As String
tcpServer.GetData strData
txtOutput.Text = strData
End Sub
Private Sub txtSendData_Change()
tcpServer.SendData txtSendData.Text
End Sub
Me da error en el server .
y el cliente es esto
Private Sub cmdConnect_Click()
tcpClient.Connect
End Sub
Private Sub Form_Load()
tcpClient.RemoteHost = "192.168.0.1"
tcpClient.RemotePort = 1001
End Sub
Private Sub tcpClient_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
tcpClient.GetData strData
txtOutput.txt = strData
End Sub
Private Sub txtSendData_Change()
tcpClient.SendData txtSendData
End Sub