Skip to content

Commit

Permalink
version 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
the8472 committed Jul 28, 2017
1 parent f1859ab commit 5511b36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>mldht.core</groupId>
<artifactId>libmldht</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.1.0</version>
<name>mldht - Bittorrent Mainline DHT library</name>
<packaging>jar</packaging>
<scm>
Expand Down
9 changes: 7 additions & 2 deletions src/lbms/plugins/mldht/kad/DHTConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,19 @@ public class DHTConstants {
InetSocketAddress.createUnresolved("router.utorrent.com", 6881),
InetSocketAddress.createUnresolved("router.silotis.us", 6881),
};
private static String version = "AZ00";
private static String version = null;

public static String getVersion() {
return version;
}

public static void setVersion (int ver) {
version = "Az" + new String(new byte[] { (byte) (ver >> 8 & 0xFF) , (byte) (ver & 0xff) }, StandardCharsets.ISO_8859_1);
version = "ml" + new String(new byte[] { (byte) (ver >> 8 & 0xFF) , (byte) (ver & 0xff) }, StandardCharsets.ISO_8859_1);
}

static {
// 0.1.0
setVersion(10);
}

}

0 comments on commit 5511b36

Please # to comment.