Skip to Content
Python Concurrency with asyncio
book

Python Concurrency with asyncio

by Matthew Fowler
February 2022
Intermediate to advanced
376 pages
10h 54m
English
Manning Publications
Content preview from Python Concurrency with asyncio

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python Testing with pytest

Python Testing with pytest

Brian Okken
Python for DevOps

Python for DevOps

Noah Gift, Kennedy Behrman, Alfredo Deza, Grig Gheorghiu

Publisher Resources

ISBN: 9781617298660Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link