Private Sub Command2_Click()
On Error Resume Next
Ws.Close
Ws.LocalPort = Text5.Text
Ws.Listen
Text1.SelStart = Len(Text1.Text)
Text1.Text = Text1.Text & "Conectando...." & vbCrLf
Text1.SelStart = Len(Text1.Text)
End Sub
------------------------------------------------------------------------
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
Ws.Close
Ws.Accept requestID
Text1.Text = "***Se ha conectado, estas listo para jugar??***" & vbCrLf
Text1.Text = Text1.Text & "***Direccion IP:" & Ws.RemoteHostIP & vbCrLf
End Sub
------------------------------------------------------------------------
Private Sub ws_close()
Ws.Close
Text1.SelStart = Len(Text1.Text)
Text1.Text = Text1.Text & vbCrLf & "*** Conexion cerrada por tu colega***" & vbCrLf
Text1.SelStart = Len(Text1.Text)
End Sub
Marcadores