Categories
Linux Networking Programming

Trio Tutorial – Simple TCP Chat Program – Part 4

Series

Part 1: https://jaytuckey.name/2021/07/22/trio-tutorial-simple-tcp-chat-program-part-1/

Part 2: https://jaytuckey.name/2021/07/24/trio-tutorial-simple-tcp-chat-program-part-2/

Part 3: https://jaytuckey.name/2021/07/24/trio-tutorial-simple-tcp-chat-program-part-3/

In part 4 we look into making the server handle disconnections without crashing. We also look into how me can make messages quicker to distribute.

For this code we use the trio functionality to wait for limited time for a task to complete, by using trio.move_on_after(seconds): https://trio.readthedocs.io/en/stable/reference-core.html#cancellation-and-timeouts

Got any questions? Contact me: https://jaytuckey.name/about/

Leave a Reply

Your email address will not be published. Required fields are marked *