I don't quite understand why you are sending data in the send complete event ? Would you care to elaborate on this ?
The folling has worked for me . This is in my server application . It's not the best , but it works . It has some overhead because it sends to all the socket instances and errors out on the disconnected ones . Well at least it did until I added a line of your code,Hope you got something out of this .
[]P
[Code]
Public Function SendStrng(ToSend As String)
'this sends to all winsocks 1 to MaxWinsock
Dim Counter As Integer
On Error GoTo Errhandler ' Error handling enabled
For Counter = 1 To MaxWinsock
If Winsock1(Counter).State = 7 Then Winsock1(Counter).SendData ToSend
Next
Errhandler:
Resume Next
On Error GoTo 0 ' Error handling disabled
End Function
[Code]




,Hope you got something out of this .
Reply With Quote