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.

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