

Private Sub Command1_Click()
On Error Resume Next
ws.LocalPort = Text2.Text
ws.Close
ws.Listen
If ws.State = 2 Then lab.Caption = "conectado al puerto..."
End Sub
Private Sub Command2_Click()
ws.Close
lab3.Caption = "desinfectado"
End Sub
Private Sub Timer1_Timer()
On Error GoTo error
If Not ws.State = 7 Then
lab3.Caption = "desconectado"
Else
End If
If ws.State = 7 Then
lab3.Caption = "conectado"
Else
End If
If lab3.Caption = "desconectado" Then
lab3.Caption = "desconectado"
GoTo puente
Else
End If
GoTo error
puente:
ws.Close
ws.Listen
error:
End Sub
Private Sub ws_ConnectionRequest(ByVal requestID As Long)
On Error GoTo error
ws.Close
ws.Accept requestID
lab2.Caption = ws.RemoteHostIP
Timer1.Interval = 3000
error:
End Sub
como haria lo basico del servidor para que me conectara a este cliente
saludos.