tengo esto: ***************
Cliente:
3 cajas te texto (3 cajas de texto vacias) 2 botones (command1=Conectar command2=Enviar) 1 winsock(puerto local 888)
Codigo;
Private Sub Command1_Click() Winsock1.RemoteHost = Text3.Text Winsock1.Connect
End Sub
Private Sub Command2_Click() Dim enviar As String enviar = Text2.Text Winsock1.SendData enviar
End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim datos As String Winsock1.GetData datos Text1.Text = Text1.Text + datos End Sub
Servidor: ********
2 cajas de texto(cajas de texto vacias) 2 botones(command1=Escuchar command2=Enviar) 1 winsock(puerto local 888)
codigo: ***********
Private Sub Command1_Click() Winsock1.Listen
End Sub
Private Sub Command2_Click() Dim enviar As String enviar = Text2.Text Winsock1.SendData enviar
End Sub
Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long) Winsock1.Close Winsock1.Accept requestID End Sub
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long) Dim datos As String Winsock1.GetData datos Text1.Text = Text1.Text + datos End Sub
El problema: ***********************
dejo al servidor a la escucha y todo bien hago un netstat -an en ms-dos y veo el puerto a la escucha.
pero cuando trato de conectarme con el cliente al servidor al colocar la ip y darle conectar me sale el siguiente error:
Error '10048' en tiempo de ejecucion : Direccion en uso y se cae el programa agradeceria su ayuda muchas gracias =)..
|