Last active
February 12, 2021 11:35
-
-
Save aksel/b3e986e2aa14ac78ec3fde87bd960312 to your computer and use it in GitHub Desktop.
Revisions
-
aksel renamed this gist
Aug 5, 2017 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,6 @@ import io.socket.client.IO import io.socket.client.Socket fun connect() { val socket = IO.socket("http://localhost:4000?user=aksel") socket.connect() -
aksel created this gist
Aug 5, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ fun connect() { val socket = IO.socket("http://localhost:4000?user=aksel") socket.connect() .on(Socket.EVENT_CONNECT, { println("connected") }) .on(Socket.EVENT_DISCONNECT, { println("disconnected") }) }