Skip to main content
gamedev.net
🔒 Locked

Fully connected network

Started by DWN Feb 18, 2009 at 3:47 PM 4 replies 1.9k views
Original Post
DWN
DWN
Prepologies if this is a rather basic question. I wrote a little set of network methods a while back that I've been using. It uses a server to connect a few computers together. Once they are fully connected, it drops out. My question is, is this done in games, or is it almost always better to have a control server involved? What might be the bandwidth/number of nodes that a fully connected network works okay for (for common network hardware with a common network buffer size)? Thanks for any help.
hplus0603
hplus0603
It's unclear exactly what you're asking for, so I'll take a stab in the dark at answering:

Almost all games use client/server topology, where the server may be one of the players. Often, there's a match-maker server that lets users find a host, and then the match-maker is not involved in the actual game. The match-maker can also do NAT punch-through introducer work.

Microsoft recommends not using more than 64 kbit/s for network connections for Xbox Live!; that will work through most existing network connections (note that the upstream is a lot more limited than downstream in many cases).
enum Bool { True, False, FileNotFound };
DWN
DWN
Thanks for the reply explaining what is usually done in games.

I am working with the arrangement where, for a few (N) nodes, each one sees each other after being introduced by another server. This uses (N-1) receiving threads and (N-1) sending threads on each machine using sockets.

At some point this 2*(N-1) threads will become unwieldy. My question is, is there a rule of thumb for when this is, on P4 technology? Am I wrong-headed about this implementation in the first place?

At this point I am not concerned with security. (Perhaps I should be?)
swiftcoder
swiftcoder
Quote:
Original post by DWN
At some point this 2*(N-1) threads will become unwieldy. My question is, is there a rule of thumb for when this is, on P4 technology? Am I wrong-headed about this implementation in the first place?
Rather than using a thread/socket, I would recommend moving to asynchronous sockets, and servicing them all with a single thread.
Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]
hplus0603
hplus0603
The Forum FAQ makes recommendations about threading and sockets.
enum Bool { True, False, FileNotFound };
DWN
DWN
Okay, why didn't I think to look there first? Sorry about that, but glad to get some advice from the experts, even if I should've known better.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.