32 iocb_table[pos].
fd = pos;
78 bucket->scheduleWrite(
this);
92 callback->cancel(reason);
109 quotaQueueReserv = 0;
117 debugs(5, 3,
"called for " << conn <<
" (" << code <<
", " << xerrn <<
")");
121 if (freefunc && buf) {
127 if (callback !=
nullptr) {
129 Params ¶ms = GetCommParams<Params>(callback);
130 if (conn !=
nullptr) params.fd = conn->fd;
133 params.size = offset;
135 params.xerrno = xerrn;
#define ScheduleCallHere(call)
Base class for Squid-to-client bandwidth limiting.
static BandwidthBucket * SelectBucket(fde *f)
void setCallback(iocb_type type, AsyncCall::Pointer &cb, char *buf, FREE *func, int sz)
void selectOrQueueWrite()
called when fd needs to write but may need to wait in line for its quota
AsyncCall::Pointer callback
void finish(Comm::Flag code, int xerrn)
finish the IO operation immediately and schedule the callback with the current state.
void cancel(const char *reason)
Actively cancel the given callback.
#define debugs(SECTION, LEVEL, CONTENT)
#define COMM_SELECT_WRITE
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
CbEntry & ioCallbacks(int fd)
iocb_type
Type of IO callbacks the Comm layer deals with.
static CbEntry * MakeCallbackTable()
void SetSelect(int, unsigned int, PF *, void *, time_t)
Mark an FD to be watched for its IO status.
void * xcalloc(size_t n, size_t sz)