add some types

This commit is contained in:
zzz
2010-12-17 21:49:34 +00:00
parent 03f58d1886
commit 60e57ec29e
2 changed files with 8 additions and 1 deletions

View File

@ -39,7 +39,13 @@ class Message
final static byte REQUEST = 6;
final static byte PIECE = 7;
final static byte CANCEL = 8;
final static byte EXTENSION = 20;
final static byte PORT = 9; // DHT (BEP 5)
final static byte SUGGEST = 13; // Fast (BEP 6)
final static byte HAVE_ALL = 14; // Fast (BEP 6)
final static byte HAVE_NONE = 15; // Fast (BEP 6)
final static byte REJECT = 16; // Fast (BEP 6)
final static byte ALLOWED_FAST = 17; // Fast (BEP 6)
final static byte EXTENSION = 20; // BEP 10
// Not all fields are used for every message.
// KEEP_ALIVE doesn't have a real wire representation

View File

@ -63,6 +63,7 @@ public class Peer implements Comparable
// bytes per bt spec: 0011223344556677
static final long OPTION_EXTENSION = 0x0000000000100000l;
static final long OPTION_FAST = 0x0000000000000004l;
static final long OPTION_DHT = 0x0000000000000001l;
private long options;
/**