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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:27:26+00:00 2026-06-11T13:27:26+00:00

Hello I am trying to build chat into an application. What I am wondering

  • 0

Hello I am trying to build chat into an application. What I am wondering is when the user logs out of the website how do I also destroy the socket.io handshake associated with that session so the user cannot send messages from say another tab when he is logged out.

I am using expressjs if that is any help.

  • 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-11T13:27:28+00:00Added an answer on June 11, 2026 at 1:27 pm

    Well in case anyone ever find this and wants to know I did figure it out.
    You can access the sockets disconnect function. I had object of users ids and their socket id so when someone logged out I called

    app.get("/logout", function(req,res){
      //do other logging out stuff
      sockets.disconnectUser(req.session.user_id);
    }
    
    // Disconnect User function
    sockets.disconnectUser = function(user_id){
      sockets.socket(users[user_id]).disconnect();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello dearest community, I am trying to build a simple AutoUpdate application using VB.NET.
I am trying to build the PHPExcel library into an application built with the
I am trying to build an application (Hello World) in Oracle JDeveloper and run.
I'm trying to build a hello world application with Xcode 4.3. So far, I
Hello I am trying to build a multi select to populate a many-to-many join
I'm trying to build a hello-world program here to check my android kit installation.
I'm trying to build Hello World in x64 assembly on my Leopard MacBook Pro.
I'm trying to build a simple Maps app based on the hello map tutorial
hello i am trying a sqlite database tutorial to build, but its not working
hello i am trying to load a list of filenames from a folder into

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.