Scala language binding lightly-tested and works

This commit is contained in:
Joseph Henry
2017-10-16 14:27:25 -07:00
parent 7c04472b68
commit e8f1a4db73
5 changed files with 14 additions and 76 deletions

View File

@@ -1,13 +1,6 @@
package zerotier;
class ZeroTier {
@native def ztjni_socket(socket_family: Int, socket_type: Int, protocol: Int): Int
@native def ztjni_startjoin(path: String, nwid: String): Int
}
object ZeroTier extends App {
System.loadLibrary("zt")
val libzt = new ZeroTier
val fd = libzt.ztjni_socket(2, 1, 0)
println(s"zts_socket(): $fd")
}