.NET MVC Long轮询

时间:2014-01-04 17:12:11

标签: ajax asp.net-mvc long-polling

我想要创建方法,当使用AsyncController添加到队列中的某些操作时,这将是我的开始:

public class AsyncTest : AsyncController
{
    public void LongPollAsync()
    {
        AsyncManager.OutstandingOperations.Increment();
        // search for messages and send them out...
        AsyncManager.OutstandingOperations.Decrement();
    }

    public ActionResult LongPollCompleted()
        {
        return Json();
    }
}

0 个答案:

没有答案