Answers for "socket io with kotlin"

0

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")
});
Posted by: Guest on June-13-2020

Browse Popular Code Answers by Language