June 2017
Beginner to intermediate
274 pages
6h 49m
English
In both previous cases, we want the server to stop worrying about a particular client, which we can do simply by returning from the client handling coroutine. The task running the coroutine finishes and that's that.
In the launched coroutine on the server, we called another coroutine called wait_closed. That pretty much does what it says-it waits for the server to be closed. Without this call, our launched coroutine will immediately terminate and, since we used run_until_complete, the whole program will terminate immediately afterward.
This would happen because start_server launches a background task and then returns rather than manage the server directly, and that's about it.
There's a lower-level communication ...
Read now
Unlock full access