After a long discussion with Microsoft Tech Support, they finally agreed with me that Winsock has a bug in it. The bug will be fixed in SP3. What happens is when you send data to an array of Winsocks (Let's say two) through a loop, it will miss the first and hit the second one unless you put so uneccessary time in between each loop.

The second issue was about changing Local Port after the array was created but before the connection was accepted. They say that this is not possible, which brings me to question why they insert a local port change in the example provided by MSDN Library. I can almost swear that I did this with VB5 and it worked, but the only true way for me to find out is to rebuild my machine so that there are no VB6 or W98 files on it. If you have 95 and VB5,
could you try this code for me. Open two instances of VB5 - 1 for Client and 1 for Server.

'Server Code ************
'Add a Winsock named sckServer, change the Index to 0
Private intMax As Long

Private Sub Form_Load()
intMax = 0
sckServer(0).LocalPort = 1001
sckServer(0).Listen
End Sub

Private Sub sckServer_ConnectionRequest(Index As Integer, ByVal requestID As Long)
If Index = 0 Then
intMax = intMax + 1
Load sckServer(intMax)
sckServer(intMax).LocalPort = 0
sckServer(intMax).Accept requestID
Load txtData(intMax)
End If
End Sub

Private Sub sckServer_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Msgbox sckServer(Index).LocalPort
End Sub


'Client Code **************
'Add a Winsock named sckClient - don't change anything else
Private Sub Form_Load()

sckClient.RemoteHost = "127.0.0.1"
sckClient.RemotePort = 1110
sckClient.Connect

End Sub

The messge box should say 0, if it says 1001, then I guess I was wrong. Thanks for any help that you can provide.

Sean Thompson
Advance Auto Store's Inc.
Network Technician