Home
last modified time | relevance | path

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

12345

/external/grpc-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()
/external/grpc-grpc/src/core/lib/slice/
Dslice.cc32 char* out = static_cast<char*>(gpr_malloc(GRPC_SLICE_LENGTH(slice) + 1)); in grpc_slice_to_c_string()
33 memcpy(out, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice)); in grpc_slice_to_c_string()
34 out[GRPC_SLICE_LENGTH(slice)] = 0; in grpc_slice_to_c_string()
46 grpc_slice out = GRPC_SLICE_MALLOC(GRPC_SLICE_LENGTH(s)); in grpc_slice_copy()
48 GRPC_SLICE_LENGTH(s)); in grpc_slice_copy()
412 if (GRPC_SLICE_LENGTH(a) != GRPC_SLICE_LENGTH(b)) return false; in grpc_slice_default_eq_impl()
413 if (GRPC_SLICE_LENGTH(a) == 0) return true; in grpc_slice_default_eq_impl()
415 GRPC_SLICE_LENGTH(a)); in grpc_slice_default_eq_impl()
426 int d = static_cast<int>(GRPC_SLICE_LENGTH(a) - GRPC_SLICE_LENGTH(b)); in grpc_slice_cmp()
429 GRPC_SLICE_LENGTH(a)); in grpc_slice_cmp()
[all …]
Dslice_string_helpers.cc32 GRPC_SLICE_LENGTH(s), flags); in grpc_dump_slice()
45 const size_t str_len = GRPC_SLICE_LENGTH(str) - read_offset; in slice_find_separator_offset()
90 end = GRPC_SLICE_LENGTH(str); in grpc_slice_split_inner()
97 end = GRPC_SLICE_LENGTH(str); in grpc_slice_split_inner()
117 GRPC_SLICE_LENGTH(str), result) != 0; in grpc_parse_slice_to_uint32()
Dslice_buffer.cc115 sb->length += GRPC_SLICE_LENGTH(s); in grpc_slice_buffer_add_indexed()
168 sb->length -= GRPC_SLICE_LENGTH(sb->slices[count]); in grpc_slice_buffer_pop()
264 size_t slice_len = GRPC_SLICE_LENGTH(slice); in slice_buffer_move_first_maybe_ref()
274 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); in slice_buffer_move_first_maybe_ref()
280 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == n); in slice_buffer_move_first_maybe_ref()
307 size_t slice_len = GRPC_SLICE_LENGTH(slice); in grpc_slice_buffer_move_first_into_buffer()
333 size_t slice_len = GRPC_SLICE_LENGTH(slice); in grpc_slice_buffer_trim_end()
368 sb->length -= GRPC_SLICE_LENGTH(slice); in grpc_slice_buffer_take_first()
378 sb->length += GRPC_SLICE_LENGTH(slice); in grpc_slice_buffer_undo_take_first()
/external/grpc-grpc/test/core/slice/
Dslice_test.cc53 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == length); in test_slice_malloc_returns_something_sensible()
94 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == 2); in test_slice_new_with_user_data()
157 GPR_ASSERT(GRPC_SLICE_LENGTH(sub) == j - i); in test_slice_sub_works()
169 GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == in check_head_tail()
170 GRPC_SLICE_LENGTH(head) + GRPC_SLICE_LENGTH(tail)); in check_head_tail()
172 GRPC_SLICE_START_PTR(head), GRPC_SLICE_LENGTH(head))); in check_head_tail()
173 GPR_ASSERT(0 == memcmp(GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(head), in check_head_tail()
174 GRPC_SLICE_START_PTR(tail), GRPC_SLICE_LENGTH(tail))); in check_head_tail()
240 GPR_ASSERT(strlen(text) == GRPC_SLICE_LENGTH(slice)); in test_slice_from_copied_string_works()
242 0 == memcmp(text, GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice))); in test_slice_from_copied_string_works()
/external/grpc-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 = (int)GRPC_SLICE_LENGTH(slice_); in Next()
123 GPR_CODEGEN_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(slice_))); in BackUp()
125 if ((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()
91 GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX); in Next()
92 byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_); in Next()
103 GPR_CODEGEN_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(slice_))); in BackUp()
Dslice.h101 size_t size() const { return GRPC_SLICE_LENGTH(slice_); } in size()
123 GRPC_SLICE_LENGTH(*slice)); in StringRefFromSlice()
128 GRPC_SLICE_LENGTH(slice)); in StringFromCopiedSlice()
/external/grpc-grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/
Dgrpc_ares_ev_driver_windows.cc110 GPR_ASSERT(GRPC_SLICE_LENGTH(read_buf_) == 0); in RegisterForOnReadableLocked()
115 buffer.len = GRPC_SLICE_LENGTH(read_buf_); in RegisterForOnReadableLocked()
159 return GRPC_SLICE_LENGTH(read_buf_) > 0; in IsFdStillReadableLocked()
176 GRPC_SLICE_LENGTH(read_buf_)); in RecvFrom()
177 if (GRPC_SLICE_LENGTH(read_buf_) == 0) { in RecvFrom()
182 for (size_t i = 0; i < GRPC_SLICE_LENGTH(read_buf_) && i < data_len; i++) { in RecvFrom()
187 GRPC_SLICE_LENGTH(read_buf_)); in RecvFrom()
215 buf.len = GRPC_SLICE_LENGTH(write_buf_); in SendWriteBuf()
243 GRPC_SLICE_LENGTH(write_buf_)); in TrySendWriteBufSyncNonBlocking()
252 GPR_ASSERT(GRPC_SLICE_LENGTH(write_buf_) == 0); in SendV()
[all …]
/external/grpc-grpc/include/grpc/impl/codegen/
Dslice.h119 #define GRPC_SLICE_LENGTH(slice) \ macro
126 GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)
127 #define GRPC_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)
142 GRPC_SLICE_START_PTR(slice) + GRPC_SLICE_LENGTH(slice)
143 #define GPR_SLICE_IS_EMPTY(slice) (GRPC_SLICE_LENGTH(slice) == 0)
/external/grpc-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()
/external/grpc-grpc/test/core/tsi/alts/handshaker/
Dalts_handshaker_client_test.cc92 GRPC_SLICE_LENGTH(*service_account1)) == 0); in validate_target_identities()
94 GRPC_SLICE_LENGTH(*service_account1)); in validate_target_identities()
97 GRPC_SLICE_LENGTH(*service_account2)) == 0); in validate_target_identities()
99 GRPC_SLICE_LENGTH(*service_account2)); in validate_target_identities()
183 GRPC_SLICE_LENGTH(*application_protocol)) == 0); in check_client_start_success()
186 GRPC_SLICE_LENGTH(*record_protocol)) == 0); in check_client_start_success()
194 GRPC_SLICE_LENGTH(*target_name)) == 0); in check_client_start_success()
195 GPR_ASSERT(GRPC_SLICE_LENGTH(*target_name) == in check_client_start_success()
221 GRPC_SLICE_LENGTH(*application_protocol)) == 0); in check_server_start_success()
232 GRPC_SLICE_LENGTH(*record_protocol)) == 0); in check_server_start_success()
[all …]
/external/grpc-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()
71 grpc_slice_sub(slice, GRPC_SLICE_LENGTH(slice) - ctx->zs.avail_in, in gzip_flate()
72 GRPC_SLICE_LENGTH(slice))); in gzip_flate()
119 size_t len = GRPC_SLICE_LENGTH(slice_out); in gzip_flate()
/external/grpc-grpc/test/core/compression/
Dstream_compression_test.cc45 size_t slice_len = GRPC_SLICE_LENGTH(buf->slices[i]); in slice_buffer_equals_string()
118 GPR_ASSERT(GRPC_SLICE_LENGTH(slice_recv) == max_output_size); in test_stream_compression_simple_compress_decompress_with_output_size_constraint()
204 grpc_slice_malloc(GRPC_SLICE_LENGTH(slice1) + GRPC_SLICE_LENGTH(slice2)); in test_stream_compression_drop_context()
206 GRPC_SLICE_LENGTH(slice1)); in test_stream_compression_drop_context()
207 memcpy(GRPC_SLICE_START_PTR(slice3) + GRPC_SLICE_LENGTH(slice1), in test_stream_compression_drop_context()
208 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()
/external/grpc-grpc/src/core/ext/transport/chttp2/transport/
Dhpack_table.cc222 size_t elem_bytes = GRPC_SLICE_LENGTH(GRPC_MDKEY(first_ent)) + in evict1()
223 GRPC_SLICE_LENGTH(GRPC_MDVALUE(first_ent)) + in evict1()
295 size_t elem_bytes = GRPC_SLICE_LENGTH(GRPC_MDKEY(md)) + in grpc_chttp2_hptbl_add()
296 GRPC_SLICE_LENGTH(GRPC_MDVALUE(md)) + in grpc_chttp2_hptbl_add()
379 size_t overhead_and_key = 32 + GRPC_SLICE_LENGTH(GRPC_MDKEY(elem)); in grpc_chttp2_get_size_in_hpack_table()
380 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()
/external/grpc-grpc/test/core/end2end/
Dcq_verifier.cc116 len += GRPC_SLICE_LENGTH(slices[i]); in merge_slices()
124 GRPC_SLICE_LENGTH(slices[i])); in merge_slices()
125 cursor += GRPC_SLICE_LENGTH(slices[i]); in merge_slices()
139 ok = GRPC_SLICE_LENGTH(a) == GRPC_SLICE_LENGTH(b) && in raw_byte_buffer_eq_slice()
141 GRPC_SLICE_LENGTH(a)); in raw_byte_buffer_eq_slice()
/external/grpc-grpc/test/core/security/
Doauth2_utils.cc51 token = static_cast<char*>(gpr_malloc(GRPC_SLICE_LENGTH(token_slice) + 1)); in on_oauth2_response()
53 GRPC_SLICE_LENGTH(token_slice)); in on_oauth2_response()
54 token[GRPC_SLICE_LENGTH(token_slice)] = '\0'; in on_oauth2_response()
/external/grpc-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()
/external/grpc-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)));
/external/grpc-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()
/external/grpc-grpc/test/core/surface/
Dbyte_buffer_reader_test.cc150 GRPC_SLICE_LENGTH(read_slice)) == 0); in read_compressed_slice()
151 read_count += GRPC_SLICE_LENGTH(read_slice); in read_compressed_slice()
224 GPR_ASSERT(GRPC_SLICE_LENGTH(slice_out) == 512 + 1024); in test_readall()
260 GPR_ASSERT(GRPC_SLICE_LENGTH(slice_out) == 512 + 1024); in test_byte_buffer_copy()

12345