使用Netty构建一个基于WebSocket的聊天室服务器

上传者: cc18107498996 | 上传时间: 2021-03-17 15:14:17 | 文件大小: 33KB | 文件类型: ZIP
使用Netty构建一个基于WebSocket的聊天室服务器。可以使多个用户使用浏览器可以同时进行相互通信。 程序逻辑: 1、客户端发送一个消息; 2、该消息将被广播到所有其他连接的客户端 服务端启动后,浏览器输入http://localhost:9999

文件下载

资源详情

[{"title":"( 24 个子文件 33KB ) 使用Netty构建一个基于WebSocket的聊天室服务器","children":[{"title":"chatRoom","children":[{"title":"server","children":[{"title":"pom.xml <span style='color:#111;'> 423B </span>","children":null,"spread":false},{"title":"target","children":[{"title":"test-classes","children":null,"spread":false},{"title":"maven-status","children":[{"title":"maven-compiler-plugin","children":[{"title":"compile","children":[{"title":"default-compile","children":[{"title":"inputFiles.lst <span style='color:#111;'> 370B </span>","children":null,"spread":false},{"title":"createdFiles.lst <span style='color:#111;'> 171B </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"testCompile","children":[{"title":"default-testCompile","children":[{"title":"inputFiles.lst <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"server-0.0.1-SNAPSHOT.jar <span style='color:#111;'> 8.41KB </span>","children":null,"spread":false},{"title":"classes","children":[{"title":"index.html <span style='color:#111;'> 1.74KB </span>","children":null,"spread":false},{"title":"com","children":[{"title":"netty","children":[{"title":"ChatServer$1.class <span style='color:#111;'> 590B </span>","children":null,"spread":false},{"title":"ChatServer.class <span style='color:#111;'> 3.07KB </span>","children":null,"spread":false},{"title":"HTTPRequestHandler.class <span style='color:#111;'> 5.82KB </span>","children":null,"spread":false},{"title":"TextWebSocketFrameHandler.class <span style='color:#111;'> 3.97KB </span>","children":null,"spread":false},{"title":"ChatServerInitializer.class <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"maven-archiver","children":[{"title":"pom.properties <span style='color:#111;'> 114B </span>","children":null,"spread":false}],"spread":true},{"title":"generated-sources","children":[{"title":"annotations","children":null,"spread":false}],"spread":true}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.m2e.core.prefs <span style='color:#111;'> 86B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 238B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"test","children":[{"title":"resources","children":null,"spread":false},{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"resources","children":[{"title":"index.html <span style='color:#111;'> 1.74KB </span>","children":null,"spread":false}],"spread":true},{"title":"java","children":[{"title":"com","children":[{"title":"netty","children":[{"title":"ChatServerInitializer.java <span style='color:#111;'> 1.84KB </span>","children":null,"spread":false},{"title":"ChatServer.java <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false},{"title":"TextWebSocketFrameHandler.java <span style='color:#111;'> 2.15KB </span>","children":null,"spread":false},{"title":"HTTPRequestHandler.java <span style='color:#111;'> 4.61KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 535B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false}],"spread":true},{"title":"pom.xml <span style='color:#111;'> 773B </span>","children":null,"spread":false},{"title":".settings","children":[{"title":"org.eclipse.m2e.core.prefs <span style='color:#111;'> 86B </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 371B </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • dongdong12345678900 :
    很有用,谢谢分享
    2019-02-26

免责申明

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