WinSock2 - Select host from all connected accounts?

I have a simple Instant Messenger, and I was trying to figure out how I can, instead of hosting a dedicated server for it, or have others have to portforward to use it, I wanted to do something similar to what Black Ops 2, and most COD games do. Select the best fit host from all the current connections. The problem is I'm not sure how to actually make them host the server, do I need to open a port for them? A better example of this would be Skype (I believe that one of the Skypers is host right?) is there anyway to accomplish this?
in reality, there is one (or multiple) server where every client connect at startup.

In case of game, when someone create server he send info to main server:
- created server at ip <..>:port<..>.

When other player use SearchForServers mechanism, main server simply list all these registered above.

In case of skype you dont connect anywhere because it is done for you. Use some port viewer to see where skype is connected (open cmd, type: netstat -b, then search for skype.exe).
The only way to ensure that the client does not need to do any port forwarding is to use a well known protocol on an established port. Even that is not quite 100%. If you think about it this really isn't all that big of a deal since an outbound rule will have to be made in the clients firewall to allow your application to connect anyway. So some kind of configuration changes have to be made no matter what you do, the only difference is that the firewall changes can be made more easily by the applications installer.

It sounds like what you want is a "peer-to-peer" architecture.
Yes, peer-to-peer is exactly what I'm looking for, might I ask how Skype does it without configurations?
You might, but unfortunately I am not able to answer specific questions about what is, and for the foreseeable future will remain, a proprietary protocol.

I'm not trying to be cryptically obnoxious or mysterious by the way, I'll honestly admit right now that I have no freaking idea how they go about their business. I can and will happily answer questions about publicly documented and released protocols. But anything else is really more work then my attention span allows for...
http://support.activision.com/articles/en_US/FAQ/Ports-Used-for-Call-of-Duty-Games

so, TCP port 3074 is used for critical data, and UDP 3074 for data streaming. What more information do you need?
@ tath: Like you pointed out before, that one uses a client server model. OP wanted to know more about how Skype manages it's peer-to-peer connections.

@OP: Also, Skype does't do it without configuration changes. Let's do a little test, install Skype on a system you have and then go look at your firewall rules. You may notice an entry or two that wasn't there before.
Topic archived. No new replies allowed.