摘要:
在MVC里面,有异步控制器,可以实现模拟消息推送机制功能1.控制器要继承至AsyncController,如public class RealTimeController : AsyncController{}2.action要采集异步形式,且成对出现Async和Completed,如public void IndexAsync(string url){}public void IndexCompleted(Info u){}3.在Async中,要说明异步等待操作 AsyncManager.OutstandingOperations.Increment();4.在有数据时候,调用AsyncMa 阅读全文