Sockets and ArrayLists
-
Hi am writing a chat server and I was stress testing my server and found some errors. Say I have an arraylist.
ArrayList sockets = new ArrayList(listOfSockets);
Now I call Socket.Select to take out the sockets that don't have data on them.Socket.Select(sockets, null, null, 100000000);
This is where the error happens, if I pass in a ArrayList that has 65 sockets in it. It causes a IndexOutOfRangeException to happen. I have tried using other ways of doing it and it causes different errors but it always happens when it reaches 65 sockets. I am dumbfounded please help. ------------------ I'm naked under my clothes... -
Hi am writing a chat server and I was stress testing my server and found some errors. Say I have an arraylist.
ArrayList sockets = new ArrayList(listOfSockets);
Now I call Socket.Select to take out the sockets that don't have data on them.Socket.Select(sockets, null, null, 100000000);
This is where the error happens, if I pass in a ArrayList that has 65 sockets in it. It causes a IndexOutOfRangeException to happen. I have tried using other ways of doing it and it causes different errors but it always happens when it reaches 65 sockets. I am dumbfounded please help. ------------------ I'm naked under my clothes...