mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Close the socket.
This commit is contained in:
parent
f79d9f9497
commit
e6a2ad98f7
2 changed files with 18 additions and 16 deletions
|
@ -5,9 +5,10 @@ import java.io.PrintWriter
|
|||
import java.net.Socket
|
||||
|
||||
fun main(argv: Array<String>) {
|
||||
val socket = Socket("localhost", 1234)
|
||||
(PrintWriter(socket.outputStream, true)).use { out ->
|
||||
out.println("""{ "name" : "getDependencies", "buildFile":
|
||||
"/Users/beust/kotlin/kobalt/kobalt/src/${Constants.BUILD_FILE_NAME}"}""")
|
||||
Socket("localhost", 1234).use { socket ->
|
||||
(PrintWriter(socket.outputStream, true)).use { out ->
|
||||
out.println("""{ "name" : "getDependencies", "buildFile":
|
||||
"/Users/beust/kotlin/kobalt/kobalt/src/${Constants.BUILD_FILE_NAME}"}""")
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue