codingtcher.com
Theme Night
Home
Login

socket io kotlin

Home » Tutorial Post » socket io kotlin

socket.io kotlin

//kotlin
import com.github.nkzawa.emitter.Emitter
import com.github.nkzawa.socketio.client.IO
import com.github.nkzawa.socketio.client.Socket

val socket = IO.socket("http://localhost:4000/")

socket.on(Socket.EVENT_CONNECT, Emitter.Listener {
    socket.emit("messages", "hi")
});

Related Post