# Some problem of winsock

Posted by Tony on February 08, 1999 at 21:55:35:

Hi , all
i've written a program of client/server with Winsock control.
surely, I've make the server listen and accept request ,and the client had set up the server's IP and port.

first time I clicked the "command1" button , but next time when i push the button again , an error occured
"Address in used"
???
Thanks, you can answer this question in Chinese or English..

Private Sub Command1_Click()
TCPClient.Connect
End Sub

Private Sub Form_Load()
TCPClient.RemoteHost = "127.0.0.1"
TCPClient.RemotePort = 2404

End Sub

Private Sub TCPClient_Connect()

TCPClient.SendData txtSend.Text
MsgBox "sent"

End Sub

Private Sub TCPClient_DataArrival(ByVal bytesTotal As Long)
Dim strData As String
TCPClient.GetData strData
txtOutput.Text = strData

End Sub

Private Sub TCPClient_SendComplete()
TCPClient.Close
frmSendMsg.Hide

End Sub

Follow Ups:

- Re: Some problem of winsock Maxwell 03:55:37 2/11/99 (0)
- Re: Some problem of winsock 6 07:06:00 2/09/99 (0)