json configs
This commit is contained in:
@ -5,11 +5,11 @@ import java.net.ServerSocket
|
||||
import java.net.Socket
|
||||
import java.io.DataInputStream
|
||||
|
||||
fun startServer(port: Int) = runBlocking {
|
||||
val tun = TunDevice("10.1.0.1")
|
||||
fun startServer(address: String, port: Int) = runBlocking {
|
||||
val tun = TunDevice(address)
|
||||
|
||||
val server = ServerSocket(port)
|
||||
println("Server started")
|
||||
println("Server started on $port")
|
||||
|
||||
while (true) {
|
||||
val client = server.accept()
|
||||
|
||||
Reference in New Issue
Block a user