GRPC C++
1.39.1
|
#include <handshaker.h>
Public Member Functions | |
HandshakeManager () | |
~HandshakeManager () override | |
void | Add (RefCountedPtr< Handshaker > handshaker) |
Adds a handshaker to the handshake manager. More... | |
void | Shutdown (grpc_error_handle why) |
Shuts down the handshake manager (e.g., to clean up when the operation is aborted in the middle). More... | |
void | DoHandshake (grpc_endpoint *endpoint, const grpc_channel_args *channel_args, grpc_millis deadline, grpc_tcp_server_acceptor *acceptor, grpc_iomgr_cb_func on_handshake_done, void *user_data) |
Invokes handshakers in the order they were added. More... | |
![]() | |
~RefCounted ()=default | |
RefCountedPtr< HandshakeManager > | Ref () GRPC_MUST_USE_RESULT |
RefCountedPtr< HandshakeManager > | Ref (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT |
void | Unref () |
void | Unref (const DebugLocation &location, const char *reason) |
RefCountedPtr< HandshakeManager > | RefIfNonZero () GRPC_MUST_USE_RESULT |
RefCountedPtr< HandshakeManager > | RefIfNonZero (const DebugLocation &location, const char *reason) GRPC_MUST_USE_RESULT |
RefCounted (const RefCounted &)=delete | |
RefCounted & | operator= (const RefCounted &)=delete |
![]() | |
virtual | ~PolymorphicRefCount ()=default |
Additional Inherited Members | |
![]() | |
RefCounted (const char *trace=nullptr, intptr_t initial_refcount=1) | |
grpc_core::HandshakeManager::HandshakeManager | ( | ) |
|
override |
void grpc_core::HandshakeManager::Add | ( | RefCountedPtr< Handshaker > | handshaker | ) |
Adds a handshaker to the handshake manager.
Takes ownership of handshaker.
void grpc_core::HandshakeManager::DoHandshake | ( | grpc_endpoint * | endpoint, |
const grpc_channel_args * | channel_args, | ||
grpc_millis | deadline, | ||
grpc_tcp_server_acceptor * | acceptor, | ||
grpc_iomgr_cb_func | on_handshake_done, | ||
void * | user_data | ||
) |
Invokes handshakers in the order they were added.
Takes ownership of endpoint, and then passes that ownership to the on_handshake_done callback. Does NOT take ownership of channel_args. Instead, makes a copy before invoking the first handshaker. acceptor will be nullptr for client-side handshakers.
When done, invokes on_handshake_done with a HandshakerArgs object as its argument. If the callback is invoked with error != GRPC_ERROR_NONE, then handshaking failed and the handshaker has done the necessary clean-up. Otherwise, the callback takes ownership of the arguments.
void grpc_core::HandshakeManager::Shutdown | ( | grpc_error_handle | why | ) |
Shuts down the handshake manager (e.g., to clean up when the operation is aborted in the middle).