There is a game toolkit I happen to like to use in my spare time when I'm bored, however it lacks online utility. It does however provide DLL support so I'm working on adding that functionality to the kit by creating a DLL that turns the game into a client and then I'm also working on a server for the client to connect to.
I'm using WinSock for all of this as it's the only net protocol I've used so far in my meager experience however I've never done any real server programming, nothing more then just one client at a time.
So my question is how do I support multiple connections? I've read many many files on Winsock, tutorials walk throughs guides etc, but I don't seem to understand how I can keep and control multiple connections short of hard coding 255 sockets or something. The first thing I tried was an array of sockets, which was fine and dandy except for some reason (I forget the error sorry!) it wouldn't compile with an array. Maybe I was doing it wrong, but I had the same problem with a vector.
Now I'm thinking unless I did those wrong and I could use them I might try a linked list, which I'm certain would work but it would seem inefficient because players don't log on and off in any given sequence.
So, can anyone tell me if there is a set in stone way to do this or if I was simply using arrays/vectors wrong? ( I can dig the code up if you need me to, but if anyone knows that you can for sure use arrays or vectors with winsock then I can just go over it my code a few more times myself I'm sure )
PS: I haven't worked on this project in a few months but I want to start it up again which is why I'm asking these questions without much clearness. So I'm sorry about that! I'm about to leave for my night classes so I figured I'd just put this out there to see if anyone had answers and if not well I can always try to find a good sample code to look at ^^