Hi all. Im just learning about this Winsock Array thing. Pretty good stuff... Anyway, I was wondering, how would I be able to tell which one of the array is currently receiving data. Is it Index. i.e. to get data would i put Winsock1(index).GetData? If not, please let me know what I would have to do
Banjo
10-01-2001, 04:27 AM
Use the DataArrival event:
<pre>Private Sub Winsock1_DataArrival(index as Integer, bytesTotal as Long)
Dim str as String
Winsock1(index).GetData str, vbString, bytesTotal
End Sub</pre>
ummm i know about the data arrival event....... thats not what i asked
I asked how would i know which socket of an array was currently receiving data.
ChiefRedBull
10-05-2001, 06:42 AM
If you examine Banjos reply you will see that he has included another parameter in the Event arguments, and rightly so.
The index that is passed holds the number pointing to the Winsock that is receiving data.
Chief
"How are we to learn, if those that know will not teach... ?" - Me.
Volte
10-05-2001, 08:25 PM
try <pre><font color=blue>Private Sub</font color=blue> Winsock1_DataArrival(index <font color=blue>as Integer</font color=blue>, bytesTotal <font color=blue>as Long</font color=blue>)
Msgbox "The index was: " & index
<font color=blue>End Sub</font color=blue></pre>
mohanakannan
11-06-2001, 03:10 AM
the index of winsock array gives u the identification of the winsock receiveing data