Here is a fragment of code. We skipped some lines to simplify it:
try {
ServerSocket(PORT).use { server ->
while (true) {
server.accept().use { socket -> // accept a new client
DataOutputStream(socket.getOutputStream()).use { output ->
output.writeUTF("Hello!") // send a message to the client
}
}
}
}
} catch (e: IOException) {
e.printStackTrace()
}
Describe this code by selecting all the applicable statements.