Home
last modified time | relevance | path

Searched refs:avail (Results 1 – 25 of 38) sorted by relevance

12

/trafficserver/plugins/experimental/slice/
H A Dtransfer.cc31 TSIOBufferReaderConsume(data->m_upstream.m_read.m_reader, avail); in transfer_content_bytes()
32 consumed += avail; in transfer_content_bytes()
38 if (0 < avail) { in transfer_content_bytes()
39 int64_t const toskip = std::min(data->m_blockskip, avail); in transfer_content_bytes()
45 avail -= toskip; in transfer_content_bytes()
49 if (0 < avail) { in transfer_content_bytes()
51 int64_t const tocopy = std::min(avail, bytesleft); in transfer_content_bytes()
60 avail -= copied; in transfer_content_bytes()
66 if (0 < avail && data->m_bytestosend <= data->m_bytessent) { in transfer_content_bytes()
67 TSIOBufferReaderConsume(data->m_upstream.m_read.m_reader, avail); in transfer_content_bytes()
[all …]
/trafficserver/plugins/experimental/mp4/
H A Dmp4.cc327 int64_t avail, toread, need, upstream_done; in mp4_transform_handler() local
350 TSIOBufferReaderConsume(input_reader, avail); in mp4_transform_handler()
375 avail = TSIOBufferReaderAvail(mtc->res_reader); in mp4_transform_handler()
378 if (avail > 0) { in mp4_transform_handler()
381 mtc->total += avail; in mp4_transform_handler()
397 if (need > avail) { in mp4_transform_handler()
398 need = avail; in mp4_transform_handler()
411 if (avail > 0) { in mp4_transform_handler()
415 mtc->pos += avail; in mp4_transform_handler()
416 mtc->total += avail; in mp4_transform_handler()
[all …]
H A Dmp4_meta.cc109 int64_t avail; in post_process_meta() local
1699 int64_t avail, left; in mp4_reader_set_32value() local
1711 offset -= avail; in mp4_reader_set_32value()
1738 int64_t avail, left; in mp4_reader_set_64value() local
1750 offset -= avail; in mp4_reader_set_64value()
1777 int64_t avail, left; in mp4_reader_get_32value() local
1790 offset -= avail; in mp4_reader_get_32value()
1819 int64_t avail, left; in mp4_reader_get_64value() local
1832 offset -= avail; in mp4_reader_get_64value()
1860 int64_t avail, need, n; in IOBufferReaderCopy() local
[all …]
/trafficserver/plugins/lua/
H A Dts_lua_io.c24 int64_t avail, need, n; in IOBufferReaderCopy() local
32 start = TSIOBufferBlockReadStart(blk, readerp, &avail); in IOBufferReaderCopy()
33 need = length < avail ? length : avail; in IOBufferReaderCopy()
H A Dts_lua_http_intercept.c248 int64_t avail; in ts_lua_http_intercept_run_coroutine() local
261 avail = TSIOBufferReaderAvail(ictx->output.reader); in ts_lua_http_intercept_run_coroutine()
263 TSVIONBytesSet(ictx->output.vio, avail + done); in ts_lua_http_intercept_run_coroutine()
266 if (avail) { in ts_lua_http_intercept_run_coroutine()
290 TSIOBufferReaderConsume(ictx->input.reader, avail); in ts_lua_http_intercept_process_read()
312 int64_t done, avail; in ts_lua_http_intercept_process_write() local
317 avail = TSIOBufferReaderAvail(ictx->output.reader); in ts_lua_http_intercept_process_write()
334 } else if (avail > 0) { in ts_lua_http_intercept_process_write()
378 int64_t avail; in ts_lua_flush() local
387 avail = TSIOBufferReaderAvail(ictx->output.reader); in ts_lua_flush()
[all …]
/trafficserver/proxy/
H A DShow.h51 ptrdiff_t avail = ebuf - buf; in show() local
56 needed = vsnprintf(buf, avail, s, va_scratch); in show()
59 if (needed >= avail) { in show()
69 avail = ebuf - buf; in show()
71 needed = vsnprintf(buf, avail, s, aap); in show()
74 if (needed >= avail) { in show()
75 …Debug("cache_inspector", "needed %d bytes, but had only %d", (int)needed, (int)avail + (int)needed… in show()
H A DTransform.cc650 int64_t avail; in handle_event() local
679 if (towrite > avail) { in handle_event()
680 towrite = avail; in handle_event()
848 int64_t toskip, tosend, avail; in transform_to_range() local
862 if (toskip > avail) { in transform_to_range()
863 toskip = avail; in transform_to_range()
873 if (avail > 0) { in transform_to_range()
876 if (tosend > avail) { in transform_to_range()
877 tosend = avail; in transform_to_range()
939 avail = reader->read_avail(); in transform_to_range()
[all …]
/trafficserver/src/traffic_server/
H A DInkIOCoreAPI.cc697 if (avail) { in TSIOBufferBlockReadStart()
698 *avail = blk->read_avail(); in TSIOBufferBlockReadStart()
703 if (avail) { in TSIOBufferBlockReadStart()
705 if (*avail < 0) { in TSIOBufferBlockReadStart()
706 *avail = 0; in TSIOBufferBlockReadStart()
722 int64_t avail; in TSIOBufferBlockReadAvail() local
724 avail = blk->read_avail(); in TSIOBufferBlockReadAvail()
728 if (avail < 0) { in TSIOBufferBlockReadAvail()
729 avail = 0; in TSIOBufferBlockReadAvail()
733 return avail; in TSIOBufferBlockReadAvail()
[all …]
/trafficserver/tests/tools/plugins/
H A Dnull_transform.c70 int64_t avail; in handle_transform() local
129 avail = TSIOBufferReaderAvail(TSVIOReaderGet(input_vio)); in handle_transform()
130 TSDebug(PLUGIN_NAME, "\tavail is %" PRId64 "", avail); in handle_transform()
131 if (towrite > avail) { in handle_transform()
132 towrite = avail; in handle_transform()
/trafficserver/example/plugins/cpp-api/websocket/
H A DWSBuffer.cc85 size_t avail = ws_buf_.size(); in read_buffered_message() local
88 if (avail < 2) { in read_buffered_message()
106 if (avail < 2 + mask_len) { in read_buffered_message()
113 if (avail < 4 + mask_len) { // 2 + 2 + length bytes + mask. in read_buffered_message()
119 if (avail < 10 + mask_len) { // 2 + 8 length bytes + mask. in read_buffered_message()
/trafficserver/example/plugins/c-api/append_transform/
H A Dappend_transform.c148 int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio)); in handle_transform() local
149 if (towrite > avail) { in handle_transform()
150 towrite = avail; in handle_transform()
314 int64_t avail; in load() local
326 char *p = TSIOBufferBlockWriteStart(blk, &avail); in load()
328 int err = TSfread(fp, p, avail); in load()
/trafficserver/example/plugins/c-api/thread_pool/
H A Dpsi.c343 parse_data(TSCont contp, TSIOBufferReader input_reader, int avail, int *toconsume, int *towrite) in parse_data() argument
358 *toconsume = avail; in parse_data()
359 *towrite = avail; in parse_data()
484 int64_t avail; in psi_include() local
485 char *ptr_block = TSIOBufferBlockWriteStart(block, &avail); in psi_include()
486 int64_t towrite = MIN(ntodo, avail); in psi_include()
612 int avail = TSIOBufferReaderAvail(input_reader); in handle_transform() local
615 if (avail > 0) { in handle_transform()
620 psi = parse_data(contp, input_reader, avail, &toconsume, &towrite); in handle_transform()
622 towrite = avail; in handle_transform()
[all …]
/trafficserver/example/plugins/c-api/passthru/
H A Dpassthru.cc106 int64_t avail = TSIOBufferReaderAvail(this->reader); in transfer_to() local
108 if (avail) { in transfer_to()
109 consumed = TSIOBufferCopy(to.iobuf, this->reader, avail, 0 /* offset */); in transfer_to()
168 int64_t avail = TSIOBufferReaderAvail(sp->client.writeio.reader); in PassthruSessionIsFinished() local
173 if (sp->server.vconn == nullptr && avail == 0) { in PassthruSessionIsFinished()
177 PassthruSessionDebug(sp, "continuing session with %" PRId64 " buffered client bytes", avail); in PassthruSessionIsFinished()
/trafficserver/example/plugins/c-api/null_transform/
H A Dnull_transform.c128 int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(input_vio)); in handle_transform() local
129 TSDebug(PLUGIN_NAME, "\tavail is %" PRId64 "", avail); in handle_transform()
130 if (towrite > avail) { in handle_transform()
131 towrite = avail; in handle_transform()
/trafficserver/plugins/authproxy/
H A Dutils.cc35 int64_t avail; in HttpDebugHeader() local
42 avail = TSIOBufferBlockReadAvail(blk, iobuf.reader); in HttpDebugHeader()
45 …AuthLogDebug("http request (%u of %u bytes):\n%*.*s", (unsigned)nbytes, (unsigned)avail, (int)nbyt… in HttpDebugHeader()
H A Dauthproxy.cc552 int64_t avail = 0; in StateAuthProxyReadContent() local
554 avail = TSIOBufferReaderAvail(auth->iobuf.reader); in StateAuthProxyReadContent()
557 AuthLogDebug("we have %u of %u needed bytes", (unsigned)avail, needed); in StateAuthProxyReadContent()
559 if (avail >= needed) { in StateAuthProxyReadContent()
572 int64_t avail; in StateAuthProxyCompleteContent() local
574 avail = TSIOBufferReaderAvail(auth->iobuf.reader); in StateAuthProxyCompleteContent()
577 AuthLogDebug("we have %u of %u needed bytes", (unsigned)avail, needed); in StateAuthProxyCompleteContent()
579 if (avail >= needed) { in StateAuthProxyCompleteContent()
/trafficserver/plugins/background_fetch/
H A Dbackground_fetch.cc365 int64_t avail; in cont_bg_fetch() local
414 avail = TSIOBufferReaderAvail(data->resp_io_buf_reader); in cont_bg_fetch()
415 data->addBytes(avail); in cont_bg_fetch()
416 TSIOBufferReaderConsume(data->resp_io_buf_reader, avail); in cont_bg_fetch()
417 TSVIONDoneSet(data->r_vio, TSVIONDoneGet(data->r_vio) + avail); in cont_bg_fetch()
433 avail = TSIOBufferReaderAvail(data->resp_io_buf_reader); in cont_bg_fetch()
434 data->addBytes(avail); in cont_bg_fetch()
435 TSIOBufferReaderConsume(data->resp_io_buf_reader, avail); in cont_bg_fetch()
436 TSVIONDoneSet(data->r_vio, TSVIONDoneGet(data->r_vio) + avail); in cont_bg_fetch()
/trafficserver/src/tscpp/api/
H A Dutils_internal.cc257 int avail = TSIOBufferReaderAvail(reader); in consumeFromTSIOBufferReader() local
259 if (avail != TS_ERROR) { in consumeFromTSIOBufferReader()
261 if (avail > 0) { in consumeFromTSIOBufferReader()
262 str.reserve(avail + 1); in consumeFromTSIOBufferReader()
276 LOG_ERROR("TSIOBufferReaderAvail returned error code %d for reader %p", avail, reader); in consumeFromTSIOBufferReader()
H A DTransformationPlugin.cc145 int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio)); in handleTransformationPluginRead() local
147 to_read, avail); in handleTransformationPluginRead()
149 if (to_read > avail) { in handleTransformationPluginRead()
150 to_read = avail; in handleTransformationPluginRead()
153 contp, write_vio, to_read, avail); in handleTransformationPluginRead()
/trafficserver/plugins/prefetch/
H A Dfetch.cc652 int64_t avail; in handler() local
703 avail = TSIOBufferReaderAvail(fetch->resp_io_buf_reader); in handler()
704 fetch->addBytes(avail); in handler()
705 TSIOBufferReaderConsume(fetch->resp_io_buf_reader, avail); in handler()
706 TSVIONDoneSet(fetch->r_vio, TSVIONDoneGet(fetch->r_vio) + avail); in handler()
722 avail = TSIOBufferReaderAvail(fetch->resp_io_buf_reader); in handler()
723 fetch->addBytes(avail); in handler()
724 TSIOBufferReaderConsume(fetch->resp_io_buf_reader, avail); in handler()
725 TSVIONDoneSet(fetch->r_vio, TSVIONDoneGet(fetch->r_vio) + avail); in handler()
/trafficserver/plugins/xdebug/
H A Dxdebug_transforms.cc120 int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(src_vio)); in body_transform() local
121 towrite = towrite > avail ? avail : towrite; in body_transform()
/trafficserver/plugins/esi/
H A DserverIntercept.cc140 int avail = TSIOBufferReaderAvail(cont_data->input.reader); in handleRead() local
141 if (avail == TS_ERROR) { in handleRead()
146 TSDebug(DEBUG_TAG, "[%s] Parsed header, avail: %d", __FUNCTION__, avail); in handleRead()
149 if (avail > 0) { in handleRead()
192 …%s] Consumed %d bytes from input vio, avail: %d", __FUNCTION__, consumed, avail); in handleRead()
/trafficserver/example/plugins/c-api/server_transform/
H A Dserver_transform.c316 int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio)); in transform_buffer_event() local
317 if (towrite > avail) { in transform_buffer_event()
318 towrite = avail; in transform_buffer_event()
407 int64_t avail; in transform_read_status_event() local
413 char *buf = (char *)TSIOBufferBlockReadStart(blk, data->output_reader, &avail); in transform_read_status_event()
414 int64_t read_ndone = (avail >= read_nbytes) ? read_nbytes : avail; in transform_read_status_event()
/trafficserver/example/plugins/c-api/bnull_transform/
H A Dbnull_transform.c120 int64_t avail = TSIOBufferReaderAvail(TSVIOReaderGet(write_vio)); in handle_buffering() local
121 if (towrite > avail) { in handle_buffering()
122 towrite = avail; in handle_buffering()
/trafficserver/plugins/experimental/tls_bridge/
H A Dtls_bridge.cc444 int64_t avail = _out.available_size(); in flow_to_ua() local
445 if (avail > 0) { in flow_to_ua()
446 int64_t n = TSIOBufferCopy(_ua._write._buff, _out._read._reader, avail, 0); in flow_to_ua()
448 TSAssert(n == avail); in flow_to_ua()
460 int64_t avail = _ua.available_size(); in flow_to_outbound() local
461 if (avail > 0) { in flow_to_outbound()
462 int64_t n = TSIOBufferCopy(_out._write._buff, _ua._read._reader, avail, 0); in flow_to_outbound()
464 TSAssert(n == avail); in flow_to_outbound()

Completed in 137 milliseconds

12