Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET SQL SQL-Server
I want to develop a website in ASP.NET Web Forms. In this website i want to connect any two online users randomly for a specified time (suppose 30 seconds).
 
I am thinking to add the users into a temp table(to keep a track of online users) and assign them a random number as soon as they log in and delete them from the temp table on log out.
 
Problems:
 
1.I have no idea how to remove the user from the table on session expire or on browser close.
 
2.I am not sure how to connect two online users randomly (like in omegle). When User A and User C are connected User B should not be able to connect to "User A and User C"
Posted 8-Jan-13 22:53pm
Edited 8-Jan-13 22:54pm
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

1 - you can't. the most you can do, is use a timeout based on a time stamp
 
2 - just mark each user as already connected to someone and don't connect them to someone else. A bit field in the DB.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100