socket服务端和客户端完整代码

上传者: 42707543 | 上传时间: 2022-09-23 10:57:39 | 文件大小: 34KB | 文件类型: ZIP
socket分为socketserver和socketclient,socketserver是一个简单的建立长连接后等待接收数据,socketclient请求建立与服务端连接,连接建立以后通过servlet发起通信。 服务端直接用application执行; 客户端部署到服务器上,启动服务即与服务端建立长连接; 长连接建立以后用http://localhost:8080/socketclient/servlet/Test 发起请求与服务端通信

文件下载

资源详情

[{"title":"( 44 个子文件 34KB ) socket服务端和客户端完整代码","children":[{"title":"socketclient-1","children":[{"title":".settings","children":[{"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.wst.common.component <span style='color:#111;'> 474B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 493B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 395B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"socket","children":[{"title":"client","children":[{"title":"Constants.java <span style='color:#111;'> 381B </span>","children":null,"spread":false},{"title":"ReadThread.java <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"OrderImpl.java <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"ClientThread.java <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"CalculateUtil.java <span style='color:#111;'> 888B </span>","children":null,"spread":false},{"title":"DataWrite.java <span style='color:#111;'> 845B </span>","children":null,"spread":false}],"spread":true},{"title":"server","children":[{"title":"Server.java <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false}],"spread":true},{"title":"servlet","children":[{"title":"ReadThreadServlet.java <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"Test.java <span style='color:#111;'> 1008B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"WebRoot","children":[{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 36B </span>","children":null,"spread":false}],"spread":true},{"title":"WEB-INF","children":[{"title":"web.xml <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"classes","children":[{"title":"com","children":[{"title":"socket","children":[{"title":"client","children":[{"title":"Constants.class <span style='color:#111;'> 509B </span>","children":null,"spread":false},{"title":"ClientThread.class <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false},{"title":"ReadThread.class <span style='color:#111;'> 2.27KB </span>","children":null,"spread":false},{"title":"DataWrite.class <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false},{"title":"CalculateUtil.class <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"OrderImpl.class <span style='color:#111;'> 1.06KB </span>","children":null,"spread":false}],"spread":true},{"title":"server","children":[{"title":"Server.class <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false}],"spread":true},{"title":"servlet","children":[{"title":"Test.class <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"ReadThreadServlet.class <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"lib","children":null,"spread":false}],"spread":true},{"title":"index.jsp <span style='color:#111;'> 831B </span>","children":null,"spread":false}],"spread":true},{"title":".mymetadata <span style='color:#111;'> 309B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 529B </span>","children":null,"spread":false},{"title":".myeclipse","children":null,"spread":false}],"spread":true},{"title":"socketserver-2","children":[{"title":".settings","children":[{"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.wst.common.component <span style='color:#111;'> 474B </span>","children":null,"spread":false},{"title":"org.eclipse.wst.jsdt.ui.superType.container <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":".jsdtscope <span style='color:#111;'> 500B </span>","children":null,"spread":false},{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 395B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"com","children":[{"title":"socket","children":[{"title":"server","children":[{"title":"Server.java <span style='color:#111;'> 2.02KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":".project <span style='color:#111;'> 1.71KB </span>","children":null,"spread":false},{"title":"WebRoot","children":[{"title":"META-INF","children":[{"title":"MANIFEST.MF <span style='color:#111;'> 36B </span>","children":null,"spread":false}],"spread":true},{"title":"WEB-INF","children":[{"title":"web.xml <span style='color:#111;'> 371B </span>","children":null,"spread":false},{"title":"classes","children":[{"title":"com","children":[{"title":"socket","children":[{"title":"server","children":[{"title":"Server.class <span style='color:#111;'> 2.58KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"lib","children":null,"spread":false}],"spread":true},{"title":"index.jsp <span style='color:#111;'> 834B </span>","children":null,"spread":false}],"spread":true},{"title":".mymetadata <span style='color:#111;'> 309B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 529B </span>","children":null,"spread":false},{"title":".myeclipse","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

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