-
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
-
用编写的一个时钟程序
用编写的一个时钟程序-prepared by using a clock procedures
- 2022-06-22 00:31:59下载
- 积分:1
-
notepad code
notepad code
- 2022-05-19 10:52:45下载
- 积分:1
-
Realize the set of a Java browser example, which realize the basic functions req...
一个Java实现的定器例子,里面实现了定时器所需的基本功能.-Realize the set of a Java browser example, which realize the basic functions required for the timer.
- 2023-06-07 01:30:04下载
- 积分:1
-
报表设计软件,很好的
报表设计软件,很好的-statements design software, good
- 2022-01-27 18:02:50下载
- 积分:1
-
用java做的试题库,好精简的.
请大家参考一下的哦.多指教的....
用java做的试题库,好精简的.
请大家参考一下的哦.多指教的.-Questions to do with java library, a good streamlined. Please refer to the Oh. And more of the advice.
- 2022-01-31 16:15:44下载
- 积分:1
-
一个java页控件的使用及示例代码,可以方便的使用tab、页浏览功能。...
一个java页控件的使用及示例代码,可以方便的使用tab、页浏览功能。-A java page controls the use and sample code, it will be convenient to use the tab, page browsing.
- 2022-05-15 09:12:54下载
- 积分:1
-
Java for a novice who, after completion of CoreJava, the best examples of actual...
对于初学Java的人来说,学完CoreJava后,最好的实战示例程序!-Java for a novice who, after completion of CoreJava, the best examples of actual combat procedures.
- 2022-02-02 13:23:02下载
- 积分:1
-
AOP程序,需要JAspect插件的存在才能在Eclipse中正常实用
AOP程序,需要JAspect插件的存在才能在Eclipse中正常实用-AOP process, the need for the existence of plug-ins can JAspect in Eclipse normal utility
- 2023-06-07 05:20:03下载
- 积分:1
-
网上电子商场的源代码,用struts+hibernate实现。
网上电子商场的源代码,用struts+hibernate实现。-Online electronic store the source code, the struts+ hibernate achieve.
- 2022-02-20 21:47:45下载
- 积分:1