Created
January 18, 2016 16:34
-
-
Save cy6erGn0m/851b35dd6e3e97039c2d to your computer and use it in GitHub Desktop.
Kotlin get free port
This file contains 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 characters
fun findFreePort() = ServerSocket(0).use { it.localPort } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment