19 #ifndef GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H
20 #define GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H
24 #include "absl/container/inlined_vector.h"
85 virtual const char*
name()
const = 0;
132 static const size_t HANDSHAKERS_INIT_SIZE = 2;
135 bool is_shutdown_ =
false;
137 absl::InlinedVector<RefCountedPtr<Handshaker>, HANDSHAKERS_INIT_SIZE>
Definition: handshaker.h:92
void Shutdown(grpc_error_handle why)
Shuts down the handshake manager (e.g., to clean up when the operation is aborted in the middle).
Definition: handshaker.cc:71
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.
Definition: handshaker.cc:169
void Add(RefCountedPtr< Handshaker > handshaker)
Adds a handshaker to the handshake manager.
Definition: handshaker.cc:58
~HandshakeManager() override
Definition: handshaker.cc:69
HandshakeManager()
Definition: handshaker.cc:56
Handshaker.
Definition: handshaker.h:78
virtual void DoHandshake(grpc_tcp_server_acceptor *acceptor, grpc_closure *on_handshake_done, HandshakerArgs *args)=0
virtual void Shutdown(grpc_error_handle why)=0
virtual const char * name() const =0
~Handshaker() override=default
Definition: ref_counted.h:282
Definition: ref_counted_ptr.h:35
void(* grpc_iomgr_cb_func)(void *arg, grpc_error_handle error)
gRPC Callback definition.
Definition: closure.h:53
int64_t grpc_millis
Definition: exec_ctx.h:37
grpc_core::Handshaker grpc_handshaker
Definition: handshaker.h:158
grpc_core::HandshakeManager grpc_handshake_manager
Definition: handshaker.h:157
void grpc_handshake_manager_add(grpc_handshake_manager *mgr, grpc_handshaker *handshaker)
Definition: handshaker.cc:215
grpc_error_handle error
Definition: lame_client.cc:54
Round Robin Policy.
Definition: backend_metric.cc:26
An array of arguments that can be passed around.
Definition: grpc_types.h:132
A closure over a grpc_iomgr_cb_func.
Definition: closure.h:56
Handshakers are used to perform initial handshakes on a connection before the client sends the initia...
Definition: handshaker.h:62
grpc_slice_buffer * read_buffer
Definition: handshaker.h:65
void * user_data
Definition: handshaker.h:71
grpc_endpoint * endpoint
Definition: handshaker.h:63
grpc_channel_args * args
Definition: handshaker.h:64
bool exit_early
Definition: handshaker.h:68
Definition: endpoint.h:106
Definition: error_internal.h:41
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice.h:78
Definition: tcp_server.h:36