Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

j33lee

What is the best way for players to communicate with server

This topic is 6941 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Ah, but it's not...

Especially not if the game is all (or mainly) server side, and you are even remotely interrested in clients that sit behind a firewall. Sockets won't bypass a firewall (in general).

In this case you need to move up a layer, and go for HTTP - it is not as fast but for a lot of applications it's a lot easier, at it has benefits (such as the firewall issue)...

I'll launch a new site in the comming weeks, which is a client/server game using HTTP, that should give an impression of what can be done with HTTP. (Java for the UI on the client, ASP for the prototype server - that might change to ISAPI, or MTS components)

/Niels

Share this post


Link to post
Share on other sites
Firewalls are easily accounted for. SOCKS4 for TCP, SOCKS5 for UDP.

As for HTTP...why punish yourself unnecessarily??? ;-)

------------------
DavidRM
Samu Games

Share this post


Link to post
Share on other sites
Correct me if I'm wrong, but doesn't both SOCKS4 and SOCKS5 require special measures with the client-side firewall, such as opening specific ports? Or possibly installation of client-side proxies?

Anyhow, I want people to be able to play my game from work (Yes I know, I'm a bad guy ) and I generally don't think IT departments are too trilled about people installing various proxies on the inside of the firewall ...

/Niels

Share this post


Link to post
Share on other sites
I've never implemented SOCKS5, but I use SOCKS4 in my game, Artifact. So long as the firewall they have supports the SOCKS4 protocol, they just have to supply the proxy server address and port # and away we go... =)

I also achieve a certain amount of "at work" players by having Artifact run in a "normal" window. It's resizeable, so they can make it fit behind their spreadsheet app with only a gold "A" icon showing in the taskbar... ;-)

------------------
DavidRM
Samu Games

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Are there any good net refrences to these protocols? SOCKS4 and SOCKS5 that is?

-ddn

Share this post


Link to post
Share on other sites
It's not exactly a specification...but here's how you use SOCKS4.

First, you point the socket to the proxy server IP and port # and initiate the connection.

Second, when the connection is established, you send the following information:

4 (8-bit value: 0x04)
1 (8-bit value: 0x01)
Port # (16-bit value)
IP address (32-bit form)
NULL (8-bit value: 0x00)

That's it.

The 4 specifies SOCKS4. I forget what the 1 does. The port and IP are obvious.

It's been a while since I researched and implemented this, so I feel a bit rusty. Hope this is helpfule.

------------------
DavidRM
Samu Games

Share this post


Link to post
Share on other sites
Hm! Never heard of companies opening for socks4 or 5 - do you have any numbers, or at least an idea as to how widespread this is?

I could imagine that it would be common if some large corperate systems already used it - you could kind of piggy bag your way through the firewall . But as far as I know, most companies are open for HTTP ONLY - and that sort of settles it for me.

There's no doubt that I'd prefer UDP for the performance gain, but it's no good if you miss your target audience ...

/Niels

Share this post


Link to post
Share on other sites
At the last place I worked, which was about a 1000-employee technology company, the firewall proxy was "invisible." If you were on the inside, getting out required no extra effort. However, getting *in* was pretty tightly locked down.

I don't know how typical that is, though.

I added the proxy support primarily so that players with home networks and modem sharing could play. But I do have a number of worker-players... =)

------------------
DavidRM
Samu Games

Share this post


Link to post
Share on other sites
Wow! Lots of responses! That's great! Thanks to everyone. I'm going to extend my question a bit farther. Does anyone know where I can get information on, or knows how to do socket programming in C++?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!