-
err
客户通过Socket(InetAddress,port)建立与服务器的连接。服务器与客户都通过构造BufferedReader,PrintWriter来建立输入输出流,然后双方通过该输入输出流来相互传递信息,一旦收到客户方的连接请求,服务器accept()方法返回一个新建的Socket对象。客户端然后向服务器发送消息,比如注册,登录,查找好友等,服务器收到来自客户的请求后,针对不同的消息处理请求, 虽然UDP不可靠但是对于icq可靠性并不太重要,而且UDP快速,所以客户间发送信息通过UDP。用户登录时通过类DatagramPacket和DatagramSocket创建UDP包括其本地接受端口以及发送端口,默认端口为5000和5001,通过取得的好友的IP地址来向好友发送消息(send(DatagramPacket)和接受消息(receive(DatagramPacket))。当用户通过UDP收到消息后,可以通过DatagramPacket的方法InetAddress getAddress()得到对方的ip地址,通过对好友列表比较以判断是谁并提示用户收到某某的消息,然后用户选择该用户查看消息,如果好友列表没有该人就显示收到陌生人的消息。用户可以按陌生人按钮查看消息。
-err
- 2022-01-23 10:11:51下载
- 积分:1
-
在Servlet实例java语言的使用,一个简单的日志管理系统为例…
java语言中servlet的用法实例,以简单日志管理系统为例说明servlet的使用-java language usage in the servlet example, a simple log management system as an example of the use of servlet
- 2022-01-30 22:53:14下载
- 积分:1
-
用jsp写的在线问答系统
用jsp写的在线问答系统-used to write quiz online system
- 2023-09-03 11:15:03下载
- 积分:1
-
* This a simple tool to send/receive UDP packet based on a
* free software d...
* This a simple tool to send/receive UDP packet based on a
* free software developed by Neil Deason.
* The purpose of program is to simulate a remote MGC So that the
* SIP Message debugging/testing is possible.-* This a simple tool to send/receive UDP p acket* based on a free software developed by Nei l Deason.* The purpose of program is to simulate So a remote MGC that the SIP Message debugging*/testing is possible.
- 2022-03-07 06:59:52下载
- 积分:1
-
适合处学者JAVA者的代码,参考学习用途
适合处学者JAVA者的代码,参考学习用途-Department for the scholars Java code, reference purposes learning
- 2022-01-26 08:29:54下载
- 积分:1
-
java 实现的 arp 基于winpcap的
java 实现的 arp 基于winpcap的-java realized arp on the winpcap
- 2022-03-17 14:59:14下载
- 积分:1
-
用JXTA实现的P2P应用程序,该应用程序主要时完成是,RestoPeer如何找到,创建和加入RestoNet对等组,并对其他的对等体的Request进行回应...
用JXTA实现的P2P应用程序,该应用程序主要时完成是,RestoPeer如何找到,创建和加入RestoNet对等组,并对其他的对等体的Request进行回应-using JXTA P2P application, the application procedures will be completed, RestoPeer how to find, create and join groups such as RestoNet right, as well as other bodies such as the right of response to the Request for
- 2022-01-25 18:38:52下载
- 积分:1
-
With a memorandum of functional calendar, java source code,
带有备忘录功能的日历,java的源代码,-With a memorandum of functional calendar, java source code,
- 2023-08-06 14:40:03下载
- 积分:1
-
java中的Struts、Hibernate三技术实现应用的春天…
java在struts、spring、hibernate三种技术中的应用实现了对县级代码的权限管理
- 2022-12-20 14:25:04下载
- 积分:1
-
heart heart heart heart heart heart
请笑纳 请笑纳 请笑纳 请笑纳-heart heart heart heart heart heart
- 2022-09-15 10:50:03下载
- 积分:1