kotlin-sockets Passing data across sockets with Kotling in the JVM (My first experience with Kotlin, though) You'll find also a gist for this sources here