liveBook · Manning

SendAsync

SendAsync is an asynchronous API operation that sends a request or data and represents its completion and result asynchronously.

How 2 Manning books explain it

C# Concurrency: Asynchronous and multithreaded programming

SendAsync is an asynchronous socket operation that transfers data and represents completion with a task containing the accepted byte count.

How it is used
Uses asynchronous socket sending to serve concurrent connections without blocking a dedicated thread during each transfer.
How deep it goes
Defines task completion and accepted-byte semantics, then demonstrates SendAsync inside an asynchronous file-serving loop.
Examples
Uses an asynchronous TCP file server that sends one-megabyte buffer segments after reading them asynchronously.
What you can do after
Apply it via C# Socket APIs to asynchronously send buffer segments and inspect the accepted byte count.

Read how C# Concurrency: Asynchronous and multithreaded programming explains SendAsync →

ASP.NET Core in Action, 3e

SendAsync is the asynchronous HttpMessageHandler method that processes an HTTP request and returns its response.

How it is used
Uses SendAsync to implement cross-cutting HTTP behavior such as authentication, logging, metrics, and request retries.
How deep it goes
Explains overriding, request modification, pipeline forwarding, response inspection, registration, and handler ordering.
Examples
Demonstrates an API-key handler that adds a header before forwarding requests through a typed-client pipeline.
What you can do after
Apply it via DelegatingHandler to customize outgoing requests and process responses in an HttpClient pipeline.

Read how ASP.NET Core in Action, 3e explains SendAsync →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.