websocket的简单实现

上传者: wushucheng18 | 上传时间: 2021-06-22 16:18:12 | 文件大小: 119KB | 文件类型: ZIP
我现在遇到的真实场景是这样的:客户在APP下单之后生成了一个二维码,接待的工作人员用微信小程序扫码核销,服务端完成订单核销和同步之后,通知APP跳转页面。第一版时间比较赶,用的是ajax轮询,虽然也解决了问题,但是我总感觉还是可以改进的,遂找了各种资源试了一下websocket的妙处。

文件下载

资源详情

[{"title":"( 31 个子文件 119KB ) websocket的简单实现","children":[{"title":"websock-v1","children":[{"title":"pom.xml <span style='color:#111;'> 910B </span>","children":null,"spread":false},{"title":"target","children":[{"title":"test-classes","children":null,"spread":false},{"title":"m2e-wtp","children":[{"title":"web-resources","children":[{"title":"META-INF","children":[{"title":"maven","children":[{"title":"com.uplus","children":[{"title":"websock-v1","children":[{"title":"pom.xml <span style='color:#111;'> 910B </span>","children":null,"spread":false},{"title":"pom.properties <span style='color:#111;'> 250B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"MANIFEST.MF <span style='color:#111;'> 111B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"classes","children":[{"title":"com","children":[{"title":"uplus","children":[{"title":"servlet","children":[{"title":"IndexServlet.class <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"MyServlet.class <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"StartServlet.class <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false}],"spread":true},{"title":"sock","children":[{"title":"WsServer.class <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false},{"title":"WsPool.class <span style='color:#111;'> 2.21KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".settings","children":[{"title":"org.eclipse.m2e.core.prefs <span style='color:#111;'> 90B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.name <span style='color:#111;'> 6B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.project.facet.core.xml <span style='color:#111;'> 252B </span>","children":null,"spread":false},{"title":"org.eclipse.core.resources.prefs <span style='color:#111;'> 74B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.common.component <span style='color:#111;'> 755B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.validation.prefs <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 639B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 430B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"test","children":[{"title":"java","children":null,"spread":false}],"spread":true},{"title":"main","children":[{"title":"webapp","children":[{"title":"WEB-INF","children":[{"title":"web.xml <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false}],"spread":true},{"title":"index.jsp <span style='color:#111;'> 535B </span>","children":null,"spread":false}],"spread":true},{"title":"resources","children":null,"spread":false},{"title":"java","children":[{"title":"com","children":[{"title":"uplus","children":[{"title":"servlet","children":[{"title":"IndexServlet.java <span style='color:#111;'> 1.10KB </span>","children":null,"spread":false},{"title":"MyServlet.java <span style='color:#111;'> 1020B </span>","children":null,"spread":false},{"title":"StartServlet.java <span style='color:#111;'> 1.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"sock","children":[{"title":"WsServer.java <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"WsPool.java <span style='color:#111;'> 2.22KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false}],"spread":true},{"title":"printscreen","children":[{"title":"1.png <span style='color:#111;'> 17.03KB </span>","children":null,"spread":false},{"title":"2.png <span style='color:#111;'> 21.67KB </span>","children":null,"spread":false},{"title":"4.png <span style='color:#111;'> 32.70KB </span>","children":null,"spread":false},{"title":"3.png <span style='color:#111;'> 33.30KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

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