0

所以我需要知道用户是否在线我怎么知道?(我知道使用会员提供者)

并且找不到为此的实现(或教程)?我或多或少了解会员提供者是如何做到的,这样做是最好的选择吗?还是更好的方法?

一些例子会很好

我的项目中的 iam usgin mvc3

4

1 回答 1

1

You need to store the last activity timestamp in your users table, and update it whenever you receive any HTTP request from a logged-in user.

A user can be considered "online" if their last activity happened recently. (the exact limit is up to you)

于 2012-07-19T13:32:48.917 回答