Server job

Report a typo

Our job is to connect to the server and load some data from it. We already have convenient functions connectToServer and loadData implemented and imported for us. All we need to do is call them in the right order. We also need to make sure that loading starts after the connection is established (when function connectToServer returns).

Both connectToServer and loadData are suspending functions, so we'll need to use a builder to call them.

This task uses dependencies that may not be available in your local IDE. As a result, you may see compilation errors or unresolved references when running the code locally. This does not affect solution validation when you submit your solution to Hyperskill.

Write a program in Kotlin
fun doAllTheJob() {
// put your code here
// use suspending functions
// connectToServer() and loadData()
}

Create a free account to access the full topic