|
Squid Web Cache master
|
Details about a particular Comm IO callback event. More...
#include <IoCallback.h>
Public Member Functions | |
| bool | active () const |
| 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 | |
| void | cancel (const char *reason) |
| Actively cancel the given callback. | |
| void | finish (Comm::Flag code, int xerrn) |
| finish the IO operation immediately and schedule the callback with the current state. | |
Public Attributes | |
| iocb_type | type |
| Comm::ConnectionPointer | conn |
| AsyncCall::Pointer | callback |
| char * | buf |
| FREE * | freefunc |
| int | size |
| int | offset |
| Comm::Flag | errcode |
| int | xerrno |
| unsigned int | quotaQueueReserv |
| reservation ID from CommQuotaQueue | |
Private Member Functions | |
| void | reset () |
Definition at line 29 of file IoCallback.h.
|
inline |
Definition at line 45 of file IoCallback.h.
References callback.
Referenced by comm_read_base(), comm_read_cancel(), Comm::ReadCancel(), setCallback(), and Comm::Write().
| void Comm::IoCallback::cancel | ( | const char * | reason | ) |
Definition at line 87 of file IoCallback.cc.
Referenced by comm_read_cancel(), and Comm::ReadCancel().
| void Comm::IoCallback::finish | ( | Comm::Flag | code, |
| int | xerrn | ||
| ) |
Definition at line 115 of file IoCallback.cc.
References assert, debugs, and ScheduleCallHere.
|
private |
Definition at line 98 of file IoCallback.cc.
| void Comm::IoCallback::selectOrQueueWrite | ( | ) |
Definition at line 74 of file IoCallback.cc.
References COMM_SELECT_WRITE, fd_table, Comm::HandleWrite, BandwidthBucket::SelectBucket(), and Comm::SetSelect().
Referenced by Comm::Write().
| void Comm::IoCallback::setCallback | ( | Comm::iocb_type | t, |
| AsyncCall::Pointer & | cb, | ||
| char * | b, | ||
| FREE * | f, | ||
| int | sz | ||
| ) |
Configure Comm::Callback for I/O
| fd | filedescriptor |
| t | IO callback type (read or write) |
| cb | callback |
| buf | buffer, if applicable |
| func | freefunc, if applicable |
| sz | buffer size |
Definition at line 60 of file IoCallback.cc.
References active(), assert, buf, callback, freefunc, offset, size, and type.
Referenced by comm_read_base(), and Comm::Write().
| char* Comm::IoCallback::buf |
Definition at line 35 of file IoCallback.h.
Referenced by setCallback().
| AsyncCall::Pointer Comm::IoCallback::callback |
Definition at line 34 of file IoCallback.h.
Referenced by active(), comm_read_cancel(), Comm::ReadCancel(), and setCallback().
| Comm::ConnectionPointer Comm::IoCallback::conn |
Definition at line 33 of file IoCallback.h.
Referenced by BandwidthBucket::applyQuota(), ClientInfo::applyQuota(), comm_read_base(), ClientInfo::scheduleWrite(), MessageBucket::scheduleWrite(), and Comm::Write().
| Comm::Flag Comm::IoCallback::errcode |
Definition at line 39 of file IoCallback.h.
| FREE* Comm::IoCallback::freefunc |
Definition at line 36 of file IoCallback.h.
Referenced by setCallback().
| int Comm::IoCallback::offset |
Definition at line 38 of file IoCallback.h.
Referenced by setCallback().
| unsigned int Comm::IoCallback::quotaQueueReserv |
Definition at line 42 of file IoCallback.h.
Referenced by ClientInfo::applyQuota(), and ClientInfo::scheduleWrite().
| int Comm::IoCallback::size |
Definition at line 37 of file IoCallback.h.
Referenced by setCallback().
| iocb_type Comm::IoCallback::type |
Definition at line 32 of file IoCallback.h.
Referenced by setCallback().
| int Comm::IoCallback::xerrno |
Definition at line 40 of file IoCallback.h.