Hi, I've made a few web servers in the past, and all worked prefectly, minus one critical problem... whenever it would receive more than one connection at a time, it would cancel any current connections and begin the new one. I don't know why, I had 1025 winsock controls.

Now I am programming a new one that I am determined to get working perfectly, and I think I need some help with that problem. Here's the code I used to use to accept connections:

VB Code:
  1. Private Sub ListenSock_ConnectionRequest(ByVal requestID As Long)
  2.  
  3. For FindOpenSock = 0 to 1024
  4.      If Sock(FindOpenSock).State = sckClosed Then
  5.           Sock(FindOpenSock).Accept requestID
  6.           ListenSock.Close
  7.           ListenSock.Listen
  8.           Exit Sub
  9.      End If
  10. Next FindOpenSock
  11.  
  12. End Sub

I mean it looks like it should be fine to me, but it always screws up. BIG THANKS IN ADVANCE!!!

-Mike