forked from hush/SilentDragonWormhole
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
532 B
24 lines
532 B
5 years ago
|
package com.zecqtwallet.wormhole
|
||
|
|
||
|
import io.javalin.Javalin
|
||
|
|
||
|
|
||
|
fun main(args : Array<String>) {
|
||
|
|
||
|
Javalin.create().apply {
|
||
|
ws("/") { ws ->
|
||
|
ws.onConnect { session ->
|
||
|
println("Connected Session")
|
||
|
}
|
||
|
ws.onClose { session, status, message ->
|
||
|
println("Closed session")
|
||
|
}
|
||
|
ws.onMessage { session, message ->
|
||
|
println("message")
|
||
|
session.send("Reply to $message")
|
||
|
}
|
||
|
}
|
||
|
}.start(7070)
|
||
|
|
||
|
}
|