8 Streams
This chapter covers
- Transports and protocols
- Using streams for network connections
- Processing command-line input asynchronously
- Creating client/server applications with streams
When writing network applications, such as our echo clients in prior chapters, we’ve employed the socket library to read from and write to our clients. While directly using sockets is useful when building low-level networking libraries, they are ultimately complex creatures with nuances outside the scope of this book. That said, many use cases of sockets rely on a few conceptually simple operations, such as starting a server, waiting for client connections, and sending data to clients. The designers of asyncio realized this and built network stream APIs to ...
Get Python Concurrency with asyncio now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.