Advertisement

Connected Clients Data Structure

Started by April 07, 2004 08:53 PM
3 comments, last by wardance 20 years, 10 months ago
I''m currently coding a UDP server/client application with Winsock, with a maximum client capacity of about 128. As of now, I''ve designed the server to store a list of connected clients in a collapsible doubly-linked list. However, I''m very seriously considering changing this, after scanning over some GDNet forum postings and realizing this might not be the quickest option available. Could anyone provide information on other options available? I''ve heard of using hash tables and vector arrays, but I''m wondering on the implementation difficulty of these? Any help would be appreciated, especially advantages/disadvantages of other methods as well as maybe a few examples or code. Thanks -wardance
One solution is a map.

Kuphryn
Advertisement
Thanks for the quick response

Could you elaborate on this concept?

-wardance
I''m just using an array.. Why? Because the host decides how many clients can join.

As for the operations, I do loop through all clients. But I only have to worry about 16 to 32.

--
You''re Welcome,
Rick Wong

- sitting in his chair doing the most time-consuming thing..
Sounds feasible, since I have a maximum client number already in mind. However, I''m wondering how fast it would be to iterate through a standard array? As well, would there be a large amount of overhead associated? Thanks.

-wardance

This topic is closed to new replies.

Advertisement