Using Winsock application under vb.net 2005
Using same client, i want to connect to many remote servers
the Exception that i m facing : "cant not send data while not connected"
i knew the problem of this Exception:the client is sending data before being connected to the specified server,hence, can you guys give me a simple hint what to add to slow the commincation(delay),and thus wait the connection to be created,then send the message "exit;"
note : i tried to use timer,but to tell you the truth, i didnt know how to well use it :S
this is the code that i am using at the Client side
Expand|Select|Wrap|Line Numbers
- Public Sub connect()
- Try
- For Each cb As CheckBox In Me.GBBranches.Controls
- wskClient.Connect(cb.Text, 5000)
- wskClient.Send("exit;")
- Next
- Catch noCon As Exception
- MsgBox(noCon.Message)
- End Try
- End Sub
Regards
Ramy
Regards,
Ramy