35 debugs(5, 5, conn <<
": sz " <<
size <<
": asynCall " << callback);
66 (
long int) state->
offset <<
", sz " << (
long int) state->
size <<
".");
75 if (nleft > 0 && !bucket->
applyQuota(nleft, state)) {
82 int xerrno = errno = 0;
85 debugs(5, 5,
"write() returns " << len);
104 debugs(5,
DBG_IMPORTANT,
"FD " << fd <<
" write failure: connection closed with " << nleft <<
" bytes remaining.");
107 }
else if (len < 0) {
109 if (
fd_table[fd].flags.socket_eof) {
110 debugs(50, 2,
"FD " << fd <<
" write failure: " <<
xstrerr(xerrno) <<
".");
113 debugs(50, 9,
"FD " << fd <<
" write failure: " <<
xstrerr(xerrno) <<
".");
116 debugs(50, 2,
"FD " << fd <<
" write failure: " <<
xstrerr(xerrno) <<
".");
#define COMMIO_FD_WRITECB(fd)
Base class for Squid-to-client bandwidth limiting.
virtual bool applyQuota(int &nleft, Comm::IoCallback *state)
static BandwidthBucket * SelectBucket(fde *f)
virtual void reduceBucket(const int len)
Decreases the bucket level.
bool selectWaiting
is between commSetSelect and commHandleWrite
Details about a particular Comm IO callback event.
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 finish(Comm::Flag code, int xerrn)
finish the IO operation immediately and schedule the callback with the current state.
Comm::ConnectionPointer conn
struct StatCounters::@112 syscalls
struct StatCounters::@112::@117 sock
int ignoreErrno(int ierrno)
#define debugs(SECTION, LEVEL, CONTENT)
void fd_bytes(const int fd, const int len, const IoDirection direction)
int FD_WRITE_METHOD(int fd, const char *buf, int len)
Abstraction layer for TCP, UDP, TLS, UDS and filedescriptor sockets.
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)
const char * xstrerr(int error)