Asynchronous I/O
The preceding section was concerned with using streams to perform synchronous I/O operations, in which a call to a read or write method blocks until the operation completes. This section discusses the .NET support for asynchronous I/O, which allows read and write operations to be performed without blocking. Version 1.4 of the Java platform includes support for asynchronous, or nonblocking, I/O, but the .NET model differs so much that we see little benefit in providing a comparison.
Asynchronous I/O is byte-oriented, not character-oriented. All classes derived from System.IO.Stream can be used in asynchronous I/O. Importantly, none of the reader and writer classes detailed in the preceding section can be used. To demonstrate asynchronous ...
Get C# for Java Developers 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.