Implements TCP Tx-side zerocopy. Must be explicitly enabled to use.
For large RPCs (>= 16KiB) it reduces the amount of CPU time spent
since it avoids a userspace to kernel data buffer copy. However, there
is a tradeoff - the application must process a callback on the socket
error queue placed by the kernel, informing the application that the
data buffer can be freed since the kernel is done. The cost of
processing the error queue means that we do not have an advantage for
small RPCs.
Implements the unary unary interceptor for the client-side. Interceptors
can be now installed by passing them as a new parameter of the `Channel`
constructor or by giving them as part of the `insecure_channel`
function.
Interceptors are executed within an Asyncio task for making some work before
the RPC invocation, and after for accessing to the intercepted call that has
been invoked.
* Remove the weird cancellation_future;
* Convert all CancelledError into RpcError with CANCELLED;
* Move part of call logic from Cython to Python layer;
* Make unary-stream call based on reader API instead of async generator.
This PR contains:
1. An ALTS context exposed for users to use, and a GetAltsContextFromAuthContext() function to get ALTS context from an AuthContext. Functionality-wise this part is similar with a previous PR https://github.com/grpc/grpc/pull/21536, but in this PR, we adjusted the code structure and made some minor changes to better suit function clientAuthzCheck()
2. A clientAuthzCheck() function for users to check if the server is authorized