19 #ifndef GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H
20 #define GRPC_CORE_LIB_CHANNEL_HANDSHAKER_H
84 virtual const char*
name()
const = 0;
135 bool CallNextHandshakerLocked(
grpc_error* error);
139 static void CallNextHandshakerFn(
void* arg,
grpc_error* error);
142 static void OnTimeoutFn(
void* arg,
grpc_error* error);
144 static const size_t HANDSHAKERS_INIT_SIZE = 2;
147 bool is_shutdown_ =
false;
Definition: handshaker.h:91
~HandshakeManager()
Definition: handshaker.cc:108
void ShutdownAllPending(grpc_error *why)
Shutdown all pending handshake managers starting at head on the server side.
Definition: handshaker.cc:88
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:211
void RemoveFromPendingMgrList(HandshakeManager **head)
Remove mgr from the server side list of all pending handshake managers.
Definition: handshaker.cc:74
void AddToPendingMgrList(HandshakeManager **head)
Add mgr to the server side list of all pending handshake managers, the list starts with *head.
Definition: handshaker.cc:62
void Add(RefCountedPtr< Handshaker > handshaker)
Adds a handshaker to the handshake manager.
Definition: handshaker.cc:97
void Shutdown(grpc_error *why)
Shuts down the handshake manager (e.g., to clean up when the operation is aborted in the middle).
Definition: handshaker.cc:113
HandshakeManager()
Definition: handshaker.cc:57
Handshaker.
Definition: handshaker.h:77
virtual void DoHandshake(grpc_tcp_server_acceptor *acceptor, grpc_closure *on_handshake_done, HandshakerArgs *args)=0
virtual const char * name() const =0
virtual ~Handshaker()=default
virtual void Shutdown(grpc_error *why)=0
Definition: inlined_vector.h:60
Definition: ref_counted.h:248
Definition: ref_counted_ptr.h:35
void(* grpc_iomgr_cb_func)(void *arg, grpc_error *error)
gRPC Callback definition.
Definition: closure.h:53
int64_t grpc_millis
Definition: exec_ctx.h:35
grpc_core::Handshaker grpc_handshaker
Definition: handshaker.h:173
grpc_core::HandshakeManager grpc_handshake_manager
Definition: handshaker.h:172
void grpc_handshake_manager_add(grpc_handshake_manager *mgr, grpc_handshaker *handshaker)
Definition: handshaker.cc:258
Round Robin Policy.
Definition: backend_metric.cc:24
Definition: sync_windows.h: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:61
grpc_slice_buffer * read_buffer
Definition: handshaker.h:64
void * user_data
Definition: handshaker.h:70
grpc_endpoint * endpoint
Definition: handshaker.h:62
grpc_channel_args * args
Definition: handshaker.h:63
bool exit_early
Definition: handshaker.h:67
Definition: endpoint.h:102
Definition: error_internal.h:39
Represents an expandable array of slices, to be interpreted as a single item.
Definition: slice.h:78
Definition: tcp_server.h:34