protocol.java

来自「peeranha42是jxta的 p2p程序核心」· Java 代码 · 共 33 行

JAVA
33
字号
package de.uni_bremen.informatik.p2p.plugins.filesharing.data;

/**
 * 
 * Holds the Strings for the Protocol of the Filesharing 
 * @author Daniel Gehrke
 *
 */
public class Protocol {

    /** Contains the searchstring for a request */
    public static String SEARCHREQUEST = "REQ";
    
    /** Contains the result for a searchrequest */
    public static String SEARCHRESULT = "RES";

    /** Contains the request from antother peer for a chunk of a file */
    public static String DOWNLOADREQUEST = "DONWLOADREQ";
    
    /** Contains the part of a file in a byte[] sent by another peer  */
    public static String DOWNLOADANSWER = "DOWNLOADANS"; 
    
    
    /** Number of package. All chunks are numbered and represent FILEPOSITION = CHUNKNR*CHUNKSIZE*/
    public static String PACKETNUMBER = "PACKETNR";
    
    /** Contains data of a chunk as byte[] */
    public static String PACKETDATA = "DATA";
    
    /** Searchtype */
    public static String SEARCHTYPE = "SEARCHTYPE";
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?