登录
首页 » Java Develop » err

err

于 2022-01-23 发布 文件大小:101.12 kB
0 142
下载积分: 2 下载次数: 1

代码说明:

客户通过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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • JAVA 的高级开发及应用的想关书籍和实例
    JAVA 的高级开发及应用的想关书籍和实例-Senior JAVA development and application of related books and would like examples of
    2022-01-30 22:03:05下载
    积分:1
  • 俄罗斯方块的java源码 可以运行,本人已经测试过了。可以无误的运行,虽然有点简单。但对于初学java的人来说还是不错的选择...
    俄罗斯方块的java源码 可以运行,本人已经测试过了。可以无误的运行,虽然有点简单。但对于初学java的人来说还是不错的选择-Russian box can run the java source code, I have been tested before. Can be error-free operation, though a bit simple. But for beginners or for those who java a good choice
    2023-06-14 09:55:04下载
    积分:1
  • 一个java发牌程序,能自动为用户发牌,很好玩
    一个java发牌程序,能自动为用户发牌,很好玩-a licensing procedures, users can automatically for the licensing, is a lot of fun
    2023-05-25 08:10:03下载
    积分:1
  • 一个基于Java语言开发的计算器的源代码
    一个基于Java语言开发的计算器的源代码-The development of a language based on Java source code for the calculator
    2022-01-22 07:40:34下载
    积分:1
  • java good of the environment, this is a U
    java方面的很好的运行环境,这是一个通票系统.-java good of the environment, this is a U-Pass system.
    2022-01-28 04:49:44下载
    积分:1
  • 掌握 JDBC 驱动程序的加载方法和JDBC
    掌握 JDBC 驱动程序的加载方法和JDBC-ODBC桥URL的形式; 掌握使用JDBC连接数据库的步骤; 掌握使用JDBC发送SQL语句的基本步骤; 掌握使用JDBC处理SQL查询结果集的方法。 程序功能: 学生信息管理:能够根据实际情况对学生的信息进行新增、查询和修改; 学生信息指的是:学号、姓名、性别、学生类型、所属班级以及java课程成绩等内容。 数据库的选择,可采用Access或SQL2000; 程序可选择通过JDBC- ODBC桥访问数据库,也可选择使用数据库的专有驱动程序,后者的连接质量较前一种要高; -Master load JDBC driver and JDBC-ODBC Bridge URL of the form master database using JDBC to connect the steps to master the use of JDBC to send SQL statements the basic steps handle and use the JDBC result sets SQL query method. Program features: Student Information Management: the ability of students according to the actual situation of the information to add, query and modify referring to the Student Information: Student ID, name, sex, type of students, their classes, as well as achievements, such as the contents of java programs. The choice of database, to be used in Access or SQL2000 procedures to choose through the JDBC-ODBC bridge to access the database, nor can either choose to use a propr
    2023-01-02 16:50:04下载
    积分:1
  • java animation cool stuff check this out
    java animation cool stuff check this out-java animation cool stuff check this out
    2022-03-13 08:10:55下载
    积分:1
  • JAVA小程序,适合初学者,入门源代码。
    JAVA小程序,适合初学者,入门源代码。-JAVA small program for beginners, beginners source code.
    2022-06-26 06:46:30下载
    积分:1
  • java编写的一个小游戏Hangman。可自己设定一个字母,再由另外的人猜,并给出提示...
    用java编写的一个小游戏Hangman。可自己设定一个字母,再由另外的人猜,并给出提示-Prepared using a small java game Hangman. One letter can be set, and then by another person to guess, and gives tips
    2022-07-06 12:53:58下载
    积分:1
  • DatePickerDemo.rar
    DatePickerDemo.rar
    2022-04-28 07:58:01下载
    积分:1
  • 696518资源总数
  • 105873会员总数
  • 12今日下载