Can anyone give me some ideas/code on how to make an array of sockets? i want to add to the array when a socket is connected, and remove when a socket is closed.. the reason i need an array is because i would like to loop through all the sockets and close/send data on them. any help on the subject will be greatly appreciated :)

- freedumb
Posted on 2001-12-24 14:36:00 by freedumb
You could allocate an array of dwords, and then store socket handles in it. When you remove one, just set the handle to 0. When adding a new one, just find the first empty (0) position and stuff your handle there. Don't forget to check if you've passed the end of the array (no empty places left)! You could also use linked lists, but I don't think you really need it here.
Posted on 2001-12-25 08:27:18 by Qweerdy