• 大小: 2.45MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-11-16
  • 语言: Java
  • 标签: tcp  socket  java  

资源简介

java建立TCP长链接,再加上心跳机制,下载后可以直接运行,包括server和client

资源截图

代码片段和文件信息

package com.orange.blog.database.bean;

// THIS CODE IS GENERATED BY greenDAO DO NOT EDIT. Enable “keep“ sections if you want to edit. 
/**
 * Entity mapped to table “USER_FRIENDS“.
 */
public class UserFriends {

    /** Not-null value. */
    private String selfUUID;
    /** Not-null value. */
    private String friendUUID;
    /** Not-null value. */
    private String friendIP;
    /** Not-null value. */
    private String friendNickName;

    public UserFriends() {
    }

    public UserFriends(String selfUUID String friendUUID String friendIP String friendNickName) {
        this.selfUUID = selfUUID;
        this.friendUUID = friendUUID;
        this.friendIP = friendIP;
        this.friendNickName = friendNickName;
    }

    /** Not-null value. */
    public String getSelfUUID() {
        return selfUUID;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setSelfUUID(String selfUUID) {
        this.selfUUID = selfUUID;
    }

    /** Not-null value. */
    public String getFriendUUID() {
        return friendUUID;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setFriendUUID(String friendUUID) {
        this.friendUUID = friendUUID;
    }

    /** Not-null value. */
    public String getFriendIP() {
        return friendIP;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setFriendIP(String friendIP) {
        this.friendIP = friendIP;
    }

    /** Not-null value. */
    public String getFriendNickName() {
        return friendNickName;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setFriendNickName(String friendNickName) {
        this.friendNickName = friendNickName;
    }

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\
     文件         718  2016-08-29 09:03  java-TCP-long-connection-master\.gitignore
     文件         706  2016-08-29 09:03  java-TCP-long-connection-master\.ignore
     文件         963  2016-08-29 09:03  java-TCP-long-connection-master\CSDNBlog4.iml
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\File\
     文件      144442  2016-08-29 09:03  java-TCP-long-connection-master\File\SocketClient.png
     文件      144442  2016-08-29 09:03  java-TCP-long-connection-master\File\SocketServer.png
     文件      761193  2016-08-29 09:03  java-TCP-long-connection-master\File\TCP长链接.pdf
     文件      114838  2016-08-29 09:03  java-TCP-long-connection-master\File\UDPServer.png
     文件       23038  2016-08-29 09:03  java-TCP-long-connection-master\File\ViewRawX.png
     文件      121964  2016-08-29 09:03  java-TCP-long-connection-master\File\serverSocket.png
     文件       21487  2016-08-29 09:03  java-TCP-long-connection-master\File\viewHeiWid.png
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\Markets\
     文件          53  2016-08-29 09:03  java-TCP-long-connection-master\Markets\markets.txt
     文件         187  2016-08-29 09:03  java-TCP-long-connection-master\README.md
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\
     文件        9943  2016-08-29 09:03  java-TCP-long-connection-master\app\app.iml
     文件        1828  2016-08-29 09:03  java-TCP-long-connection-master\app\build.gradle
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\key\
     文件        2104  2016-08-29 09:03  java-TCP-long-connection-master\app\key\CSDNBlog.jks
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\libs\
     文件     1105958  2016-08-29 09:03  java-TCP-long-connection-master\app\libs\jackson-all-1.9.0.jar
     文件         197  2016-08-29 09:03  java-TCP-long-connection-master\app\proguard-rules.pro
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\src\
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\src\main\
     文件        1922  2016-08-29 09:03  java-TCP-long-connection-master\app\src\main\AndroidManifest.xml
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\src\main\dbAutoCreateCode\
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\src\main\dbAutoCreateCode\com\
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\src\main\dbAutoCreateCode\com\orange\
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\src\main\dbAutoCreateCode\com\orange\blog\
     目录           0  2016-08-29 09:03  java-TCP-long-connection-master\app\src\main\dbAutoCreateCode\com\orange\blog\database\
............此处省略190个文件信息

评论

共有 条评论