Go to the documentation of this file.
37 typedef struct local_zero_copy_grpc_protector {
39 } local_zero_copy_grpc_protector;
42 typedef struct local_tsi_handshaker_result {
44 unsigned char* unused_bytes;
45 size_t unused_bytes_size;
46 } local_tsi_handshaker_result;
49 typedef struct local_tsi_handshaker {
51 } local_tsi_handshaker;
68 const unsigned char**
bytes,
70 if (
self ==
nullptr ||
bytes ==
nullptr || bytes_size ==
nullptr) {
74 auto*
result =
reinterpret_cast<local_tsi_handshaker_result*
>(
76 *bytes_size =
result->unused_bytes_size;
82 if (
self ==
nullptr) {
85 local_tsi_handshaker_result*
result =
86 reinterpret_cast<local_tsi_handshaker_result*
>(
100 tsi_result create_handshaker_result(
const unsigned char* received_bytes,
101 size_t received_bytes_size,
103 if (
self ==
nullptr) {
107 local_tsi_handshaker_result*
result =
108 grpc_core::Zalloc<local_tsi_handshaker_result>();
109 if (received_bytes_size > 0) {
111 static_cast<unsigned char*
>(
gpr_malloc(received_bytes_size));
112 memcpy(
result->unused_bytes, received_bytes, received_bytes_size);
114 result->unused_bytes_size = received_bytes_size;
124 size_t received_bytes_size,
const unsigned char** ,
127 if (
self ==
nullptr) {
134 *bytes_to_send_size = 0;
135 create_handshaker_result(received_bytes, received_bytes_size,
result);
140 if (
self ==
nullptr) {
143 local_tsi_handshaker* handshaker =
144 reinterpret_cast<local_tsi_handshaker*
>(
self);
162 if (
self ==
nullptr) {
166 local_tsi_handshaker* handshaker = grpc_core::Zalloc<local_tsi_handshaker>();
168 *
self = &handshaker->base;
GPRAPI void gpr_free(void *ptr)
GPRAPI void * gpr_malloc(size_t size)
static const tsi_handshaker_vtable handshaker_vtable
static tsi_result handshaker_next(tsi_handshaker *self, const unsigned char *received_bytes, size_t received_bytes_size, const unsigned char **, size_t *, tsi_handshaker_result **, tsi_handshaker_on_next_done_cb cb, void *user_data)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static void handshaker_result_destroy(tsi_handshaker_result *self)
GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format,...) GPR_PRINT_FORMAT_CHECK(4
static void handshaker_destroy(tsi_handshaker *self)
void(* tsi_handshaker_on_next_done_cb)(tsi_result status, void *user_data, const unsigned char *bytes_to_send, size_t bytes_to_send_size, tsi_handshaker_result *handshaker_result)
tsi_result tsi_local_handshaker_create(tsi_handshaker **self)
static tsi_result handshaker_result_get_frame_protector_type(const tsi_handshaker_result *, tsi_frame_protector_type *frame_protector_type)
static tsi_result handshaker_result_extract_peer(const tsi_handshaker_result *self, tsi_peer *peer)
static tsi_result handshaker_result_get_unused_bytes(const tsi_handshaker_result *self, const unsigned char **bytes, size_t *bytes_size)
static const tsi_handshaker_result_vtable result_vtable
@ TSI_FRAME_PROTECTOR_NONE
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:16