Home
last modified time | relevance | path

Searched refs:GRPC_SLICE_LENGTH (Results 1 – 25 of 108) sorted by relevance

12345

/third_party/grpc/test/core/util/
Dslice_splitter.cc59 length += GRPC_SLICE_LENGTH(src_slices[i]); in grpc_split_slices()
67 GRPC_SLICE_LENGTH(src_slices[i])); in grpc_split_slices()
68 length += GRPC_SLICE_LENGTH(src_slices[i]); in grpc_split_slices()
74 length += GRPC_SLICE_LENGTH(src_slices[i]); in grpc_split_slices()
81 for (j = 0; j < GRPC_SLICE_LENGTH(src_slices[i]); j++) { in grpc_split_slices()
116 if (GRPC_SLICE_LENGTH(slices[i]) + length > capacity) { in grpc_slice_merge()
117 capacity = GPR_MAX(capacity * 2, GRPC_SLICE_LENGTH(slices[i]) + length); in grpc_slice_merge()
121 GRPC_SLICE_LENGTH(slices[i])); in grpc_slice_merge()
122 length += GRPC_SLICE_LENGTH(slices[i]); in grpc_slice_merge()
/third_party/grpc/test/core/slice/
Dslice_test.cc54 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == length); in test_slice_malloc_returns_something_sensible()
88 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 2); in test_slice_new_with_user_data()
151 GPR_ASSERT(GRPC_SLICE_LENGTH(sub) == j - i); in test_slice_sub_works()
163 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == in check_head_tail()
164 GRPC_SLICE_LENGTH(head) + GRPC_SLICE_LENGTH(tail)); in check_head_tail()
166 GRPC_SLICE_START_PTR(head), GRPC_SLICE_LENGTH(head))); in check_head_tail()
167 GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(head), in check_head_tail()
168 GRPC_SLICE_START_PTR(tail), GRPC_SLICE_LENGTH(tail))); in check_head_tail()
234 GPR_ASSERT(strlen(text) == GRPC_SLICE_LENGTH(slice)); in test_slice_from_copied_string_works()
236 0 == memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); in test_slice_from_copied_string_works()
[all …]
/third_party/grpc/include/grpcpp/impl/codegen/
Dproto_buffer_writer.h94 if (GRPC_SLICE_LENGTH(slice_) > remain) { in Next()
109 GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX); in Next()
110 byte_count_ += * size = static_cast<int>(GRPC_SLICE_LENGTH(slice_)); in Next()
123 GPR_CODEGEN_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(slice_))); in BackUp()
125 if (static_cast<size_t>(count) == GRPC_SLICE_LENGTH(slice_)) { in BackUp()
129 &slice_, GRPC_SLICE_LENGTH(slice_) - count); in BackUp()
Dproto_buffer_reader.h76 *data = GRPC_SLICE_START_PTR(*slice_) + GRPC_SLICE_LENGTH(*slice_) - in Next()
90 GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(*slice_) <= INT_MAX); in Next()
91 byte_count_ += * size = static_cast<int>(GRPC_SLICE_LENGTH(*slice_)); in Next()
102 GPR_CODEGEN_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(*slice_))); in BackUp()
Dslice.h102 size_t size() const { return GRPC_SLICE_LENGTH(slice_); } in size()
124 GRPC_SLICE_LENGTH(*slice)); in StringRefFromSlice()
129 GRPC_SLICE_LENGTH(slice)); in StringFromCopiedSlice()
/third_party/grpc/src/core/lib/slice/
Dslice.cc34 char* out = static_cast<char*>(gpr_malloc(GRPC_SLICE_LENGTH(slice) + 1)); in grpc_slice_to_c_string()
35 memcpy(out, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice)); in grpc_slice_to_c_string()
36 out[GRPC_SLICE_LENGTH(slice)] = 0; in grpc_slice_to_c_string()
43 grpc_slice out = GRPC_SLICE_MALLOC(GRPC_SLICE_LENGTH(s)); in grpc_slice_copy()
45 GRPC_SLICE_LENGTH(s)); in grpc_slice_copy()
489 if (GRPC_SLICE_LENGTH(a) != GRPC_SLICE_LENGTH(b)) return false; in grpc_slice_default_eq_impl()
490 if (GRPC_SLICE_LENGTH(a) == 0) return true; in grpc_slice_default_eq_impl()
492 GRPC_SLICE_LENGTH(a)); in grpc_slice_default_eq_impl()
529 int d = static_cast<int>(GRPC_SLICE_LENGTH(a) - GRPC_SLICE_LENGTH(b)); in grpc_slice_cmp()
532 GRPC_SLICE_LENGTH(a)); in grpc_slice_cmp()
[all …]
Dslice_string_helpers.cc33 GRPC_SLICE_LENGTH(s), flags); in grpc_dump_slice()
40 GRPC_SLICE_LENGTH(s), flags, &len)); in grpc_dump_slice_to_slice()
54 const size_t str_len = GRPC_SLICE_LENGTH(str) - read_offset; in slice_find_separator_offset()
99 end = GRPC_SLICE_LENGTH(str); in grpc_slice_split_inner()
106 end = GRPC_SLICE_LENGTH(str); in grpc_slice_split_inner()
126 GRPC_SLICE_LENGTH(str), result) != 0; in grpc_parse_slice_to_uint32()
Dslice_buffer.cc131 sb->length += GRPC_SLICE_LENGTH(s); in grpc_slice_buffer_add_indexed()
184 sb->length -= GRPC_SLICE_LENGTH(sb->slices[count]); in grpc_slice_buffer_pop()
281 size_t slice_len = GRPC_SLICE_LENGTH(slice); in slice_buffer_move_first_maybe_ref()
291 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); in slice_buffer_move_first_maybe_ref()
297 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); in slice_buffer_move_first_maybe_ref()
324 size_t slice_len = GRPC_SLICE_LENGTH(slice); in grpc_slice_buffer_move_first_into_buffer()
350 size_t slice_len = GRPC_SLICE_LENGTH(slice); in grpc_slice_buffer_trim_end()
385 sb->length -= GRPC_SLICE_LENGTH(slice); in grpc_slice_buffer_take_first()
392 sb->length -= GRPC_SLICE_LENGTH(sb->slices[0]); in grpc_slice_buffer_remove_first()
403 sb->length -= GRPC_SLICE_LENGTH(sb->slices[0]); in grpc_slice_buffer_sub_first()
[all …]
/third_party/grpc/include/grpc/impl/codegen/
Dslice.h99 #define GRPC_SLICE_LENGTH(slice) \ macro
106 GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)
107 #define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)
122 GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)
123 #define GPR_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)
/third_party/grpc/test/core/iomgr/
Dload_file_test.cc52 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); in test_load_empty_file()
56 GPR_ASSERT(GRPC_SLICE_LENGTH(slice_with_null_term) == 1); in test_load_empty_file()
82 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 0); in test_load_failure()
105 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == strlen(blah)); in test_load_small_file()
110 GPR_ASSERT(GRPC_SLICE_LENGTH(slice_with_null_term) == (strlen(blah) + 1)); in test_load_small_file()
142 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == buffer_size); in test_load_big_file()
Derror_test.cc66 GRPC_SLICE_LENGTH(str))); in test_set_get_str()
72 GRPC_SLICE_LENGTH(str))); in test_set_get_str()
85 GRPC_SLICE_LENGTH(str))); in test_copy_and_unref()
95 GRPC_SLICE_LENGTH(str))); in test_copy_and_unref()
101 GRPC_SLICE_LENGTH(str))); in test_copy_and_unref()
186 GRPC_SLICE_LENGTH(str))); in test_os_error()
/third_party/grpc/src/core/lib/compression/
Dmessage_compress.cc43 GPR_ASSERT(GRPC_SLICE_LENGTH(outbuf) <= uint_max); in zlib_body()
44 zs->avail_out = static_cast<uInt> GRPC_SLICE_LENGTH(outbuf); in zlib_body()
49 GPR_ASSERT(GRPC_SLICE_LENGTH(input->slices[i]) <= uint_max); in zlib_body()
50 zs->avail_in = static_cast<uInt> GRPC_SLICE_LENGTH(input->slices[i]); in zlib_body()
56 GPR_ASSERT(GRPC_SLICE_LENGTH(outbuf) <= uint_max); in zlib_body()
57 zs->avail_out = static_cast<uInt> GRPC_SLICE_LENGTH(outbuf); in zlib_body()
Dstream_compression_gzip.cc57 ctx->zs.avail_in = static_cast<uInt> GRPC_SLICE_LENGTH(*slice); in gzip_flate()
70 in, GRPC_SLICE_LENGTH(*slice) - ctx->zs.avail_in, in gzip_flate()
71 GRPC_SLICE_LENGTH(*slice)); in gzip_flate()
119 size_t len = GRPC_SLICE_LENGTH(slice_out); in gzip_flate()
/third_party/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/
Dgrpc_ares_ev_driver_windows.cc147 GPR_ASSERT(GRPC_SLICE_LENGTH(read_buf_) == 0); in RegisterForOnReadableLocked()
172 buffer.len = GRPC_SLICE_LENGTH(read_buf_); in ContinueRegisterForOnReadableLocked()
254 bool IsFdStillReadableLocked() { return GRPC_SLICE_LENGTH(read_buf_) > 0; } in IsFdStillReadableLocked()
272 GetName(), read_buf_has_data_, GRPC_SLICE_LENGTH(read_buf_)); in RecvFrom()
278 for (size_t i = 0; i < GRPC_SLICE_LENGTH(read_buf_) && i < data_len; i++) { in RecvFrom()
283 GRPC_SLICE_LENGTH(read_buf_)); in RecvFrom()
284 if (GRPC_SLICE_LENGTH(read_buf_) == 0) { in RecvFrom()
315 buf.len = GRPC_SLICE_LENGTH(write_buf_); in SendWriteBuf()
359 GPR_ASSERT(GRPC_SLICE_LENGTH(write_buf_) == 0); in SendVUDP()
374 GRPC_SLICE_LENGTH(write_buf_)); in SendVUDP()
[all …]
/third_party/grpc/src/core/ext/transport/chttp2/transport/
Dhpack_table.cc79 size_t elem_bytes = GRPC_SLICE_LENGTH(GRPC_MDKEY(first_ent)) + in evict1()
80 GRPC_SLICE_LENGTH(GRPC_MDVALUE(first_ent)) + in evict1()
150 size_t elem_bytes = GRPC_SLICE_LENGTH(GRPC_MDKEY(md)) + in grpc_chttp2_hptbl_add()
151 GRPC_SLICE_LENGTH(GRPC_MDVALUE(md)) + in grpc_chttp2_hptbl_add()
232 size_t key_len = GRPC_SLICE_LENGTH(GRPC_MDKEY(elem)); in grpc_chttp2_get_size_in_hpack_table()
234 size_t value_len = GRPC_SLICE_LENGTH(GRPC_MDVALUE(elem)); in grpc_chttp2_get_size_in_hpack_table()
Dbin_decoder.cc84 size_t len = GRPC_SLICE_LENGTH(slice); in grpc_chttp2_base64_infer_length_after_decode()
89 if (GPR_UNLIKELY(GRPC_SLICE_LENGTH(slice) - len > 2)) { in grpc_chttp2_base64_infer_length_after_decode()
162 size_t input_length = GRPC_SLICE_LENGTH(input); in grpc_chttp2_base64_decode()
207 size_t input_length = GRPC_SLICE_LENGTH(input); in grpc_chttp2_base64_decode_with_length()
/third_party/grpc/test/core/compression/
Dstream_compression_test.cc46 size_t slice_len = GRPC_SLICE_LENGTH(buf->slices[i]); in slice_buffer_equals_string()
119 GPR_ASSERT(GRPC_SLICE_LENGTH(slice_recv) == max_output_size); in test_stream_compression_simple_compress_decompress_with_output_size_constraint()
205 grpc_slice_malloc(GRPC_SLICE_LENGTH(slice1) + GRPC_SLICE_LENGTH(slice2)); in test_stream_compression_drop_context()
207 GRPC_SLICE_LENGTH(slice1)); in test_stream_compression_drop_context()
208 memcpy(GRPC_SLICE_START_PTR(slice3) + GRPC_SLICE_LENGTH(slice1), in test_stream_compression_drop_context()
209 GRPC_SLICE_START_PTR(slice2), GRPC_SLICE_LENGTH(slice2)); in test_stream_compression_drop_context()
Dmessage_compress_test.cc60 GRPC_SLICE_LENGTH(value), in assert_passthrough()
62 GRPC_SLICE_LENGTH(value), 0), in assert_passthrough()
186 GPR_ASSERT(GRPC_SLICE_LENGTH(corrupted.slices[1]) > 8); in test_bad_decompression_data_crc()
187 idx = GRPC_SLICE_LENGTH(corrupted.slices[1]) - 8; in test_bad_decompression_data_crc()
/third_party/grpc/src/core/lib/surface/
Dvalidate_metadata.cc66 if (GRPC_SLICE_LENGTH(slice) == 0) { in grpc_validate_header_key_is_legal()
70 if (GRPC_SLICE_LENGTH(slice) > UINT32_MAX) { in grpc_validate_header_key_is_legal()
100 GRPC_SLICE_LENGTH(slice)); in grpc_is_binary_header_internal()
/third_party/grpc/test/core/end2end/
Dcq_verifier.cc125 len += GRPC_SLICE_LENGTH(slices[i]); in merge_slices()
133 GRPC_SLICE_LENGTH(slices[i])); in merge_slices()
134 cursor += GRPC_SLICE_LENGTH(slices[i]); in merge_slices()
148 ok = GRPC_SLICE_LENGTH(a) == GRPC_SLICE_LENGTH(b) && in raw_byte_buffer_eq_slice()
150 GRPC_SLICE_LENGTH(a)); in raw_byte_buffer_eq_slice()
/third_party/grpc/test/core/security/
Doauth2_utils.cc52 token = static_cast<char*>(gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1)); in on_oauth2_response()
54 GRPC_SLICE_LENGTH(token_slice)); in on_oauth2_response()
55 token[GRPC_SLICE_LENGTH(token_slice)] = '\0'; in on_oauth2_response()
Dalts_security_connector_test.cc101 GRPC_SLICE_LENGTH(serialized_peer_versions), in test_missing_security_level_property_failure()
169 GRPC_SLICE_LENGTH(serialized_peer_versions), in test_alts_peer_to_auth_context_success()
181 GRPC_SLICE_LENGTH(serialized_alts_ctx), in test_alts_peer_to_auth_context_success()
/third_party/grpc/src/core/tsi/alts/zero_copy_frame_protector/
Dalts_grpc_integrity_only_record_protocol.cc53 GRPC_SLICE_LENGTH(unprotected_slices->slices[i])); in alts_grpc_integrity_only_extra_copy_protect()
54 data += GRPC_SLICE_LENGTH(unprotected_slices->slices[i]); in alts_grpc_integrity_only_extra_copy_protect()
100 GRPC_SLICE_LENGTH(header_slice)}; in alts_grpc_integrity_only_protect()
102 GRPC_SLICE_LENGTH(tag_slice)}; in alts_grpc_integrity_only_protect()
/third_party/grpc/src/ruby/ext/grpc/
Drb_byte_buffer.c50 GRPC_SLICE_LENGTH(next)); in grpc_rb_byte_buffer_to_s()
63 GRPC_SLICE_LENGTH(slice)); in grpc_rb_slice_to_ruby_string()
/third_party/grpc/test/cpp/cocoapods/generic/
Dgeneric.mm51 len += GRPC_SLICE_LENGTH(slices[i]);
58 memcpy(cursor, GRPC_SLICE_START_PTR(slices[i]), GRPC_SLICE_LENGTH(slices[i]));
59 cursor += GRPC_SLICE_LENGTH(slices[i]);
76 res = (GRPC_SLICE_LENGTH(a) == GRPC_SLICE_LENGTH(b)) &&
77 (0 == memcmp(GRPC_SLICE_START_PTR(a), GRPC_SLICE_START_PTR(b), GRPC_SLICE_LENGTH(a)));

12345