25 clientConnection(conn), entry(anEntry), sc(nullptr), writeOffset(0), closer(nullptr)
46 if (closer !=
nullptr) {
50 clientConnection->close();
59 Must(entry !=
nullptr);
61 entry->registerAbortCallback(call);
73 Must(entry !=
nullptr);
82 Must(data !=
nullptr);
87 asyncCall(16, 5,
"Mgr::StoreToCommWriter::noteStoreCopied",
98 scheduleCommWrite(ioBuf);
112 asyncCall(16, 5,
"Mgr::StoreToCommWriter::noteCommWrote",
122 Must(clientConnection !=
nullptr && params.
fd == clientConnection->fd);
124 writeOffset += params.
size;
133 if (clientConnection) {
134 clientConnection->noteClosure();
135 clientConnection =
nullptr;
138 mustStop(
"commClosed");
145 if (entry !=
nullptr) {
150 entry->unregisterAbortCallback(
"StoreToCommWriter done");
151 entry->unlock(
"Mgr::StoreToCommWriter::swanSong");
162 writeOffset >= entry->objectLen();
#define ScheduleCallHere(call)
RefCount< AsyncCallT< Dialer > > asyncCall(int aDebugSection, int aDebugLevel, const char *aName, const Dialer &aDialer)
UnaryCbdataDialer< Argument1 > cbdataDialer(typename UnaryCbdataDialer< Argument1 >::Handler *handler, Argument1 *arg1)
int fd
FD which the call was about. Set by the async call creator.
Comm::Flag flag
comm layer result status.
static void HandleStoreAbort(StoreToCommWriter *param)
called by Store if the entry is no longer usable
void start() override
called by AsyncStart; do not call directly
bool doneAll() const override
whether positive goal has been reached
void scheduleStoreCopy()
request more action results from the store
void close()
closes the local connection to the HTTP client, if any
void noteCommClosed(const CommCloseCbParams ¶ms)
called by Comm if the client socket got closed
AsyncCall::Pointer closer
comm_close handler
static void NoteStoreCopied(void *data, StoreIOBuffer ioBuf)
StoreToCommWriter(const Comm::ConnectionPointer &conn, StoreEntry *anEntry)
~StoreToCommWriter() override
void noteStoreCopied(StoreIOBuffer ioBuf)
receive some action results from the store
void noteCommWrote(const CommIoCbParams ¶ms)
called by Comm after the action results are written
void scheduleCommWrite(const StoreIOBuffer &ioBuf)
tell Comm to write action results
Comm::ConnectionPointer clientConnection
HTTP client descriptor.
struct StoreIOBuffer::@123 flags
AsyncCall::Pointer comm_add_close_handler(int fd, CLCB *handler, void *data)
void comm_remove_close_handler(int fd, CLCB *handler, void *data)
#define debugs(SECTION, LEVEL, CONTENT)
bool IsConnOpen(const Comm::ConnectionPointer &conn)
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
int storeUnregister(store_client *sc, StoreEntry *e, void *data)
void storeClientCopy(store_client *sc, StoreEntry *e, StoreIOBuffer copyInto, STCB *callback, void *data)
store_client * storeClientListAdd(StoreEntry *e, void *data)