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 7638685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:13:58+00:00 2026-05-31T08:13:58+00:00

I am developing an application in nodeJS which uses socket.io for interactive gameplay. Inside

  • 0

I am developing an application in nodeJS which uses socket.io for interactive gameplay. Inside the socket.on(‘connection’) callback block, I have declared several variables. From what I can tell, these variables are connection-specific and there will be an instance for each callback fired on a socket connection for each client.

During my tests, I tried in two browsers and was able to play two independent game sessions at the same time which lead me to confirm this view of those variables.

However, when in a more live environment, I was noticing other players actions appearing as actions on my screen. I don’t use broadcast anywhere, just simple emits inside the connection block, so I am perplexed why I see this happening.

Is my assumption about connection-specific variables incorrect? Or is there a more subtle application-specific reason this might be happening?

  • 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-05-31T08:13:58+00:00Added an answer on May 31, 2026 at 8:13 am

    Your assumption is correct – the variables are local to the per-socket connection event. There is something else going on which is causing you issues.

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

Sidebar

Related Questions

I have heard that when developing application which uses a database you should do
I'm developing an application with node.js and socket.io. I have built a small-scale project
Hi We are developing application in node.js , socket.io , and redis. we have
i m developing application in which i have to change the background image on
I am developing an application in which i have to read the contents of
I am developing application in which i have to create url request when server
When developing an application which mostly interacts with a database, what is a good
I developing an application in which i calling web services on iphone. I want
I developing an application in which i want to print the values on a
Greetings, We are developing a scientific QT Application which detect the border of a

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.