#include "squid.h"
#include "acl/FilledChecklist.h"
#include "base/AsyncCbdataCalls.h"
#include "base/CodeContext.h"
#include "event.h"
#include "globals.h"
#include "HttpReply.h"
#include "HttpRequest.h"
#include "MemBuf.h"
#include "MemObject.h"
#include "mime_header.h"
#include "sbuf/Stream.h"
#include "SquidConfig.h"
#include "SquidMath.h"
#include "StatCounters.h"
#include "Store.h"
#include "store/SwapMetaIn.h"
#include "store_swapin.h"
#include "StoreClient.h"
#include "DelayPools.h"
Go to the source code of this file.
Functions | |
static void | storeClientCopy2 (StoreEntry *e, store_client *sc) |
static bool | CheckQuickAbortIsReasonable (StoreEntry *entry) |
store_client * | storeClientListAdd (StoreEntry *e, void *data) |
void | storeClientCopy (store_client *sc, StoreEntry *e, StoreIOBuffer copyInto, STCB *callback, void *data) |
static void | storeClientReadHeader (void *data, const char *buf, ssize_t len, StoreIOState::Pointer) |
static void | storeClientReadBody (void *data, const char *buf, ssize_t len, StoreIOState::Pointer) |
int | storeUnregister (store_client *sc, StoreEntry *e, void *data) |
int | storePendingNClients (const StoreEntry *e) |
Variables | |
static StoreIOState::STRCB | storeClientReadBody |
static StoreIOState::STRCB | storeClientReadHeader |
Function Documentation
◆ CheckQuickAbortIsReasonable()
|
static |
Definition at line 884 of file store_client.cc.
References assert, MemObject::baseReply(), RequestFlags::cachable, Config, debugs, EBIT_TEST, MemObject::endOffset(), ENTRY_SPECIAL, HttpRequest::flags, StoreEntry::flags, HttpRequest::getRangeOffsetLimit(), KEY_PRIVATE, SquidConfig::max, StoreEntry::mem_obj, SquidConfig::min, SquidConfig::pct, SquidConfig::quickAbort, HttpRequest::range, MemObject::request, Store::Root(), shutting_down, STORE_PENDING, StoreEntry::store_status, and storePendingNClients().
Referenced by storeUnregister().
◆ storeClientCopy()
void storeClientCopy | ( | store_client * | sc, |
StoreEntry * | e, | ||
StoreIOBuffer | copyInto, | ||
STCB * | callback, | ||
void * | data | ||
) |
Asynchronously read HTTP response headers and/or body bytes from Store.
The requested zero-based HTTP body offset is specified via the StoreIOBuffer::offset field. The first call (for a given store_client object) must specify zero offset.
The requested HTTP body portion size is specified via the StoreIOBuffer::length field. The function may return fewer body bytes.
See STCB for result delivery details.
Definition at line 213 of file store_client.cc.
Referenced by asHandleReply(), asnCacheStart(), netdbExchangeHandleReply(), netdbExchangeStart(), peerDigestHandleReply(), peerDigestRequest(), Mgr::StoreToCommWriter::scheduleStoreCopy(), UrnState::start(), and urnHandleReply().
◆ storeClientCopy2()
|
static |
Definition at line 319 of file store_client.cc.
References assert, debugs, StoreEntry::getMD5Text(), and sc.
Referenced by store_client::copy(), and StoreEntry::invokeHandlers().
◆ storeClientListAdd()
store_client * storeClientListAdd | ( | StoreEntry * | e, |
void * | data | ||
) |
Definition at line 123 of file store_client.cc.
References MemObject::addClient(), assert, StoreEntry::mem_obj, NULL, and sc.
Referenced by Ssl::ServerBump::ServerBump(), asnCacheStart(), clientReplyContext::createStoreEntry(), clientReplyContext::doGetMoreData(), netdbExchangeStart(), peerDigestRequest(), clientReplyContext::processExpired(), clientReplyContext::setReplyToStoreEntry(), Mgr::StoreToCommWriter::start(), and UrnState::start().
◆ storeClientReadBody()
|
static |
Definition at line 704 of file store_client.cc.
References sc.
◆ storeClientReadHeader()
|
static |
Definition at line 697 of file store_client.cc.
References sc.
◆ storePendingNClients()
int storePendingNClients | ( | const StoreEntry * | e | ) |
Definition at line 874 of file store_client.cc.
References debugs, StoreEntry::mem_obj, and MemObject::nclients.
Referenced by CheckQuickAbortIsReasonable(), FwdState::completed(), StoreEntry::doAbandon(), and statStoreEntry().
◆ storeUnregister()
int storeUnregister | ( | store_client * | sc, |
StoreEntry * | e, | ||
void * | data | ||
) |
Definition at line 749 of file store_client.cc.
References StoreEntry::abort(), assert, cbdataReferenceDone, CheckQuickAbortIsReasonable(), MemObject::clientCount(), MemObject::clients, debugs, dlinkDelete(), StoreEntry::getMD5Text(), StatCounters::ins, StoreEntry::kickProducer(), MemObject::kickReads(), StoreEntry::lock(), StoreEntry::mem_obj, MemObject::nclients, StoreIOState::readerDone, sc, statCounter, STORE_OK, StoreEntry::store_status, storeClose(), StatCounters::swap, StoreEntry::swapOut(), StoreEntry::swapoutFailed(), StoreEntry::swappedOut(), and StoreEntry::unlock().
Referenced by ASState::~ASState(), DigestFetchState::~DigestFetchState(), netdbExchangeState::~netdbExchangeState(), Ssl::ServerBump::~ServerBump(), UrnState::~UrnState(), peerDigestFetchFinish(), peerDigestFetchReply(), clientReplyContext::removeStoreReference(), and Mgr::StoreToCommWriter::swanSong().
Variable Documentation
◆ storeClientReadBody
|
static |
Definition at line 42 of file store_client.cc.
Referenced by store_client::fileRead().
◆ storeClientReadHeader
|
static |
Definition at line 43 of file store_client.cc.
Referenced by store_client::fileRead().