Added untested Scala binding
This commit is contained in:
13
examples/bindings/scala/libzt.scala
Normal file
13
examples/bindings/scala/libzt.scala
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
class ZeroTier {
|
||||
@native def ztjni_socket(socket_family: Int, socket_type: Int, protocol: Int): 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")
|
||||
}
|
||||
Reference in New Issue
Block a user