Jump to content
  • Advertisement

Archived

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

Robinhood

Game Login Server Problem

This topic is 5279 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

I am developing a net game login server,and I found there are two way to process the login request.One is processing the requests one by one,and the other is processing several requests simultaneously in many threads.I don''t want which to choose,please help me.If you got a better idear,share it with me,OK?

Share this post


Link to post
Share on other sites
Advertisement
How involved is the login process? You don''t need to process requests one by one, or use separate threads. The server should just accept messages, and be able to identify both the client that sent the message and the message itself. The server then just keeps track of how far along each client is in the login process.

For example, you have a separate thread that reads incoming messages (or use the main thread if you wish), and then once they arrive in full dispatches them to be processed. They are routed depending on the message type and client.

Share this post


Link to post
Share on other sites
You are talking about a fundamental portion of the infrastructure for your network code. You really should plan out the overall protocol for communication before you go any further that way you can select the best approach for the way to handle it.

Share this post


Link to post
Share on other sites
TCP as you need to make sure that any messages you get are intact and the data is in the right order.

Share this post


Link to post
Share on other sites
Thank you for helping me.Now I got another question.The players'' profiles are stored in database,and shall I let clients directly access the database or let my server query the database and then send back to clients?

Share this post


Link to post
Share on other sites
let your server query the database and then send back to clients

The client should never have any type of access to the DB.

-=[ Megahertz ]=-

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!