Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8630239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:01:10+00:00 2026-06-12T09:01:10+00:00

Suppose 2 players are playing a game on 2 different browsers. The game states

  • 0

Suppose 2 players are playing a game on 2 different browsers. The game states are stored in session variables, each browsers has a different session but the game object requires two players to move forth. The game manager makes sure two different sessions have signed on, before letting the players to proceed to the game pages. This would be a multi-page game, that has a sign in, pick colors, and end game. The cleanest way to disconnect the player is to wait till the game ends and the player can choose that they don’t want to play anymore.

What if a player navigates away from the game pages, how can we let the other player know that the game has been terminated, so we can cleanly disconnect the remaining player to bring him back to the sign in page, in which we wait for a new player. How does the browser listen for a disconnect between two sessions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T09:01:11+00:00Added an answer on June 12, 2026 at 9:01 am

    Sessions are not maintained on browser side. Neither browser is aware of session. You can have multiple strategies to achieve this result

    1. There are many client side javascripts available which can detect that the user is leaving the page and show appropriate warning or send the message to the server that the user has quit the page. They can also detect that the browser window is closing. You can use one of them.

    2. On server side, you will have to check the last response time of a user. when a user does not respond for a pre-defined time, you can consider him/her as disconnected.

    3. You can configure the session timeout in asp.net. You will also get an event in global.asax file when the session expires. This way, you will be able to determine that the user is disconnected.

    I would recommend that you should use a combination of all three to achieve the result. If one of these fails, the other comes to play.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose we have two browsers opened, and two players are connected to each other
I have an arrayList of object Player. Player has field id, and score. suppose
Suppose I've got a card-game app, which features a Player model, which has an
Suppose that I'm building game server using Erlang. It's very common circulation each user
Suppose I have a static method of my class that returns an object of
Consider the following game on an undirected graph G. There are two players, a
Support we have an n * m table, and two players play this game.
I'm working on an Android game based on Playing Cards ( Bridge , to
I am building a very simple game with Ruby on Rails. Two players are
Suppose I have a game written in C/C++. For simplicity, I have: struct masterStruct

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.