代码很简单,并都有注释,在此就不作说明了,如果有疑问欢迎在下方评论。
服务端(ChatHandler.ashx)
- <%@ WebHandler Language="C#" Class="ChatHandler" %>
- using System; using System.Web;
- using System.Collections; using System.Collections.Generic;
- using System.Linq; using System.Web.Script.Serialization;
- using System.Threading; using System.Collections.Concurrent;
- public class ChatHandler : IHttpHandler
- {
- private class Msg {
- public string name { get; set; } public string sendtime { get; set; }
- public string content { get; set; } public string readednams { get; set; }










