I want to initialize socket IO in my kotlin app.
my problem is here :
private var mSocket: Socket? = null { try { mSocket = IO.socket
The right syntax is below for anyone who is interested in the future
private lateinit var mSocket:Socket fun socket(){ try { mSocket=IO.socket("http://host:port") } catch(e: URISyntaxException){ println("Exception"+e) } }