GRPC Core
9.0.0
|
Handshakers are used to perform initial handshakes on a connection before the client sends the initial request. More...
#include <handshaker.h>
Data Fields | |
grpc_endpoint * | endpoint = nullptr |
grpc_channel_args * | args = nullptr |
grpc_slice_buffer * | read_buffer = nullptr |
bool | exit_early = false |
void * | user_data = nullptr |
Handshakers are used to perform initial handshakes on a connection before the client sends the initial request.
Some examples of what a handshaker can be used for includes support for HTTP CONNECT on the client side and various types of security initialization.
In general, handshakers should be used via a handshake manager. Arguments passed through handshakers and to the on_handshake_done callback.
For handshakers, all members are input/output parameters; for example, a handshaker may read from or write to endpoint and then later replace it with a wrapped endpoint. Similarly, a handshaker may modify args.
A handshaker takes ownership of the members while a handshake is in progress. Upon failure or shutdown of an in-progress handshaker, the handshaker is responsible for destroying the members and setting them to NULL before invoking the on_handshake_done callback.
For the on_handshake_done callback, all members are input arguments, which the callback takes ownership of.
grpc_channel_args* grpc_core::HandshakerArgs::args = nullptr |
grpc_endpoint* grpc_core::HandshakerArgs::endpoint = nullptr |
bool grpc_core::HandshakerArgs::exit_early = false |
grpc_slice_buffer* grpc_core::HandshakerArgs::read_buffer = nullptr |
void* grpc_core::HandshakerArgs::user_data = nullptr |