java 编程 用socket实现简单通讯

上传者: yesican123 | 上传时间: 2023-02-21 22:49:42 | 文件大小: 23KB | 文件类型: ZIP
使用sockt进行通讯,首先解决的问题是我们需要有一个seversocket当作服务器clientsocket作为客户端,有了服务器与客户端我们自然就可以进行消息通讯,那么接下来我们需要解决的问题就是,客户端与服务器如何接受和发出消息,在此我给出了我自己一个解决的方法,那就是多线程了,我们有一个接受消息的线程receivehandler用来不断的接受消息,和发送信息的线程sendmessagehandler可以用来不断的发送消息,

文件下载

资源详情

[{"title":"( 23 个子文件 23KB ) java 编程 用socket实现简单通讯","children":[{"title":"socket","children":[{"title":"Client","children":[{"title":"bin","children":[{"title":"EhcoClient.class <span style='color:#111;'> 1.13KB </span>","children":null,"spread":false},{"title":"TalkHandler.class <span style='color:#111;'> 1.58KB </span>","children":null,"spread":false},{"title":"sendMessage.class <span style='color:#111;'> 2.14KB </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"EhcoClient.java <span style='color:#111;'> 758B </span>","children":null,"spread":false},{"title":"sendMessage.java <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"TalkHandler.java <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 382B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 232B </span>","children":null,"spread":false}],"spread":true},{"title":"network","children":[{"title":"bin","children":[{"title":"TalkHandler.class <span style='color:#111;'> 2.63KB </span>","children":null,"spread":false},{"title":"sendMessage.class <span style='color:#111;'> 1.88KB </span>","children":null,"spread":false},{"title":"EhcoServer.class <span style='color:#111;'> 2.94KB </span>","children":null,"spread":false},{"title":"StringProcess.class <span style='color:#111;'> 936B </span>","children":null,"spread":false},{"title":"ConnectDatabase.class <span style='color:#111;'> 3.29KB </span>","children":null,"spread":false},{"title":"Handler.class <span style='color:#111;'> 900B </span>","children":null,"spread":false}],"spread":true},{"title":"src","children":[{"title":"ConnectDatabase.java <span style='color:#111;'> 1.81KB </span>","children":null,"spread":false},{"title":"Handler.java <span style='color:#111;'> 546B </span>","children":null,"spread":false},{"title":"EhcoServer.java <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"StringProcess.java <span style='color:#111;'> 527B </span>","children":null,"spread":false},{"title":"sendMessage.java <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"TalkHandler.java <span style='color:#111;'> 1.70KB </span>","children":null,"spread":false}],"spread":true},{"title":".project <span style='color:#111;'> 383B </span>","children":null,"spread":false},{"title":".classpath <span style='color:#111;'> 314B </span>","children":null,"spread":false}],"spread":true},{"title":"readme.txt <span style='color:#111;'> 10.08KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

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