WebSocket实现了消息推送、聊天室、客户端聊天

上传者: tanglingbo | 上传时间: 2021-06-01 16:18:41 | 文件大小: 1.7MB | 文件类型: ZIP
WebSocket实现了消息推送、聊天室、客户端聊天;服务器端是用C#窗体写的;处理使用了HPSocket,连接数量HPSocket支持多少就支持多少连接数量,目测至少支持1万;网页端主要是以实现功能为主;比较简单;数据传送使用json字符串;文本长读至少支持65536个字符,具体是多少没有测试;在这里作为学习的方式分享给大家一起学习;有写得不对的地方请多多包涵;这个示例也是很匆忙的写出来的是帮朋友写的;

文件下载

资源详情

[{"title":"( 93 个子文件 1.7MB ) WebSocket实现了消息推送、聊天室、客户端聊天","children":[{"title":"WebSocket","children":[{"title":"截图","children":[{"title":"客户端界面.png <span style='color:#111;'> 32.29KB </span>","children":null,"spread":false},{"title":"服务器端界面.png <span style='color:#111;'> 14.45KB </span>","children":null,"spread":false}],"spread":true},{"title":"客户端","children":[{"title":".project <span style='color:#111;'> 977B </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 17.05KB </span>","children":null,"spread":false},{"title":"img","children":null,"spread":false},{"title":"js","children":[{"title":"moment.js <span style='color:#111;'> 105.33KB </span>","children":null,"spread":false},{"title":"jquery-1.10.2.min.js <span style='color:#111;'> 91.93KB </span>","children":null,"spread":false}],"spread":true},{"title":"css","children":null,"spread":false},{"title":"Client","children":[{"title":".project <span style='color:#111;'> 968B </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 123B </span>","children":null,"spread":false},{"title":"img","children":null,"spread":false},{"title":"js","children":null,"spread":false},{"title":"css","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"服务器端","children":[{"title":".vs","children":[{"title":"WebSocketServerTest1","children":[{"title":"v14","children":[{"title":".suo <span style='color:#111;'> 108.50KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"config.config <span style='color:#111;'> 588B </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.sln <span style='color:#111;'> 2.70KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":null,"spread":false},{"title":"WebSocketServerTest1.vshost.exe <span style='color:#111;'> 22.16KB </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false},{"title":"config.config <span style='color:#111;'> 589B </span>","children":null,"spread":false},{"title":"HPSocketCS.pdb <span style='color:#111;'> 283.50KB </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.pdb <span style='color:#111;'> 81.50KB </span>","children":null,"spread":false},{"title":"x64","children":[{"title":"Debug","children":null,"spread":false},{"title":"Release","children":null,"spread":false}],"spread":false},{"title":"Newtonsoft.Json.dll <span style='color:#111;'> 325.50KB </span>","children":null,"spread":false},{"title":"Release","children":null,"spread":false},{"title":"HPSocketCS.dll <span style='color:#111;'> 135.00KB </span>","children":null,"spread":false},{"title":"HPSocket4C_U.dll <span style='color:#111;'> 2.08MB </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.exe <span style='color:#111;'> 37.50KB </span>","children":null,"spread":false}],"spread":false},{"title":"HPSocketCS","children":[{"title":"HttpServer.cs <span style='color:#111;'> 22.58KB </span>","children":null,"spread":false},{"title":"TcpClient.cs <span style='color:#111;'> 31.24KB </span>","children":null,"spread":false},{"title":"SSLHttpServer.cs <span style='color:#111;'> 6.90KB </span>","children":null,"spread":false},{"title":"TcpPullServer.cs <span style='color:#111;'> 3.46KB </span>","children":null,"spread":false},{"title":"SSLPullAgent.cs <span style='color:#111;'> 4.11KB </span>","children":null,"spread":false},{"title":"TcpAgent.cs <span style='color:#111;'> 39.22KB </span>","children":null,"spread":false},{"title":"SSLPackServer.cs <span style='color:#111;'> 3.31KB </span>","children":null,"spread":false},{"title":"TcpPullAgent.cs <span style='color:#111;'> 3.73KB </span>","children":null,"spread":false},{"title":"IpAddress.cs <span style='color:#111;'> 238B </span>","children":null,"spread":false},{"title":"SSLClient.cs <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"TcpPackServer.cs <span style='color:#111;'> 2.64KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false}],"spread":false},{"title":"Extra.cs <span style='color:#111;'> 3.61KB </span>","children":null,"spread":false},{"title":"SSLHttpClient.cs <span style='color:#111;'> 4.66KB </span>","children":null,"spread":false},{"title":"SSLPackClient.cs <span style='color:#111;'> 3.14KB </span>","children":null,"spread":false},{"title":"HttpAgent.cs <span style='color:#111;'> 29.06KB </span>","children":null,"spread":false},{"title":"SSLHttpAgent.cs <span style='color:#111;'> 4.62KB </span>","children":null,"spread":false},{"title":"TcpPackAgent.cs <span style='color:#111;'> 2.59KB </span>","children":null,"spread":false},{"title":"SSLAgent.cs <span style='color:#111;'> 5.01KB </span>","children":null,"spread":false},{"title":"SSLPullClient.cs <span style='color:#111;'> 4.01KB </span>","children":null,"spread":false},{"title":"TcpPackClient.cs <span style='color:#111;'> 2.59KB </span>","children":null,"spread":false},{"title":"TcpServer.cs <span style='color:#111;'> 39.01KB </span>","children":null,"spread":false},{"title":"SSLHttpSdk.cs <span style='color:#111;'> 2.64KB </span>","children":null,"spread":false},{"title":"SSLPullServer.cs <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":"HttpClient.cs <span style='color:#111;'> 28.69KB </span>","children":null,"spread":false},{"title":"HPSocketCS.csproj <span style='color:#111;'> 6.66KB </span>","children":null,"spread":false},{"title":"SSLServer.cs <span style='color:#111;'> 6.26KB </span>","children":null,"spread":false},{"title":"WebSocketServer.cs <span style='color:#111;'> 10.41KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"TempPE","children":null,"spread":false},{"title":"HPSocketCS.pdb <span style='color:#111;'> 283.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.32KB </span>","children":null,"spread":false},{"title":"HPSocketCS.csproj.FileListAbsolute.txt <span style='color:#111;'> 838B </span>","children":null,"spread":false},{"title":"HPSocketCS.csprojResolveAssemblyReference.cache <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"HPSocketCS.dll <span style='color:#111;'> 135.00KB </span>","children":null,"spread":false}],"spread":false},{"title":"x64","children":[{"title":"Debug","children":[{"title":"TempPE","children":null,"spread":false},{"title":"HPSocketCS.pdb <span style='color:#111;'> 287.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.45KB </span>","children":null,"spread":false},{"title":"HPSocketCS.csproj.FileListAbsolute.txt <span style='color:#111;'> 756B </span>","children":null,"spread":false},{"title":"HPSocketCS.csprojResolveAssemblyReference.cache <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"HPSocketCS.dll <span style='color:#111;'> 134.00KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"x86","children":[{"title":"Debug","children":[{"title":"TempPE","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 6.32KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"ErrorResult.cs <span style='color:#111;'> 379B </span>","children":null,"spread":false},{"title":"SSLPackAgent.CS <span style='color:#111;'> 3.10KB </span>","children":null,"spread":false},{"title":"SSLSdk.cs <span style='color:#111;'> 13.75KB </span>","children":null,"spread":false},{"title":"HttpSdk.cs <span style='color:#111;'> 61.45KB </span>","children":null,"spread":false},{"title":"TcpPullClient.cs <span style='color:#111;'> 3.41KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"Debug","children":null,"spread":false}],"spread":false},{"title":"Common.cs <span style='color:#111;'> 650B </span>","children":null,"spread":false},{"title":"Sdk.cs <span style='color:#111;'> 108.60KB </span>","children":null,"spread":false}],"spread":false},{"title":"WebSocketServerTest1","children":[{"title":"myClass","children":[{"title":"MyWebSocketServer.cs <span style='color:#111;'> 6.86KB </span>","children":null,"spread":false},{"title":"MyException.cs <span style='color:#111;'> 284B </span>","children":null,"spread":false},{"title":"baseInfo.cs <span style='color:#111;'> 4.98KB </span>","children":null,"spread":false},{"title":"MyUser.cs <span style='color:#111;'> 754B </span>","children":null,"spread":false},{"title":"Utils.cs <span style='color:#111;'> 4.08KB </span>","children":null,"spread":false}],"spread":true},{"title":"BLL","children":[{"title":"Message.cs <span style='color:#111;'> 2.16KB </span>","children":null,"spread":false}],"spread":true},{"title":"Form1.cs <span style='color:#111;'> 42.46KB </span>","children":null,"spread":false},{"title":"Program.cs <span style='color:#111;'> 501B </span>","children":null,"spread":false},{"title":"Form1.resx <span style='color:#111;'> 6.56KB </span>","children":null,"spread":false},{"title":"Properties","children":[{"title":"Settings.settings <span style='color:#111;'> 249B </span>","children":null,"spread":false},{"title":"Resources.Designer.cs <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"AssemblyInfo.cs <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"Settings.Designer.cs <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"Resources.resx <span style='color:#111;'> 5.48KB </span>","children":null,"spread":false}],"spread":true},{"title":"Form1.Designer.cs <span style='color:#111;'> 16.00KB </span>","children":null,"spread":false},{"title":"obj","children":[{"title":"Debug","children":[{"title":"TempPE","children":null,"spread":false},{"title":"WebSocketServerTest1.Form1.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.Properties.Resources.resources <span style='color:#111;'> 180B </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.csproj.GenerateResource.Cache <span style='color:#111;'> 1012B </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.csprojResolveAssemblyReference.cache <span style='color:#111;'> 20.67KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferencesInput.cache <span style='color:#111;'> 7.01KB </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.pdb <span style='color:#111;'> 81.50KB </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.csproj.FileListAbsolute.txt <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"WebSocketServerTest1.exe <span style='color:#111;'> 37.50KB </span>","children":null,"spread":false},{"title":"DesignTimeResolveAssemblyReferences.cache <span style='color:#111;'> 1.42KB </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":"bin","children":[{"title":"Debug","children":[{"title":"WebSocketServerTest1.vshost.exe.manifest <span style='color:#111;'> 490B </span>","children":null,"spread":false}],"spread":false},{"title":"Release","children":null,"spread":false}],"spread":false},{"title":"DAL","children":[{"title":"mssqlConnet.cs <span style='color:#111;'> 8.10KB </span>","children":null,"spread":false}],"spread":false},{"title":"WebSocketServerTest1.csproj <span style='color:#111;'> 4.52KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • 小农同学 :
    可以可以!
    2019-01-22

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明