Updated bindings

This commit is contained in:
Joseph Henry
2017-11-21 15:24:51 -08:00
parent d6fcdf5277
commit a4a5ea5c31
14 changed files with 636 additions and 33 deletions

View File

@@ -30,7 +30,7 @@ object ExampleApp extends App {
// load libzt.dylib or libzt.so
System.loadLibrary("zt")
val libzt = new ZeroTier
libzt.startjoin("/Users/joseph/op/zt/libzt/ztjni", "1212121212121212")
libzt.startjoin("/Users/joseph/op/zt/libzt/ztjni", 0xa09acf0232a930f7L)
val fd = libzt.socket(2, 1, 0)
println(s"libzt.socket(): $fd")
}

View File

@@ -32,14 +32,14 @@ class ZeroTier {
// socket types
// basic service controls
@native def start(path: String, blocking: Boolean): Int
@native def startjoin(path: String, nwid: String): Int
@native def startjoin(path: String, nwid: Long): Int
@native def stop(): Unit
@native def running(): Int
@native def join(nwid: String): Unit
@native def leave(nwid: String): Unit
@native def join(nwid: Long): Unit
@native def leave(nwid: Long): Unit
// advanced service controls
//@native def get_path(): Unit
//@native def get_id(): Int
@native def get_node_id(): Long
//@native def get_6plane_addr(): Unit
//@native def get_rfc4193_addr(): Unit
// socket API