Details about a particular Comm IO callback event. More...

#include <IoCallback.h>

Collaboration diagram for Comm::IoCallback:

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 More...
 
void cancel (const char *reason)
 Actively cancel the given callback. More...
 
void finish (Comm::Flag code, int xerrn)
 finish the IO operation immediately and schedule the callback with the current state. More...
 

Public Attributes

iocb_type type
 
Comm::ConnectionPointer conn
 
AsyncCall::Pointer callback
 
char * buf
 
FREEfreefunc
 
int size
 
int offset
 
Comm::Flag errcode
 
int xerrno
 
unsigned int quotaQueueReserv
 reservation ID from CommQuotaQueue More...
 

Private Member Functions

void reset ()
 

Detailed Description

Definition at line 29 of file IoCallback.h.

Member Function Documentation

◆ active()

bool Comm::IoCallback::active ( ) const
inline

Definition at line 45 of file IoCallback.h.

References callback, and NULL.

Referenced by comm_read_base(), comm_read_cancel(), Comm::ReadCancel(), setCallback(), and Comm::Write().

◆ cancel()

void Comm::IoCallback::cancel ( const char *  reason)

Definition at line 82 of file IoCallback.cc.

References NULL.

Referenced by comm_read_cancel(), and Comm::ReadCancel().

◆ finish()

void Comm::IoCallback::finish ( Comm::Flag  code,
int  xerrn 
)

Definition at line 110 of file IoCallback.cc.

References assert, code, conn, debugs, NULL, and ScheduleCallHere.

◆ reset()

void Comm::IoCallback::reset ( )
private

Definition at line 93 of file IoCallback.cc.

References conn, and NULL.

◆ selectOrQueueWrite()

void Comm::IoCallback::selectOrQueueWrite ( )

◆ setCallback()

void Comm::IoCallback::setCallback ( Comm::iocb_type  t,
AsyncCall::Pointer cb,
char *  b,
FREE f,
int  sz 
)

Configure Comm::Callback for I/O

Parameters
fdfiledescriptor
tIO callback type (read or write)
cbcallback
bufbuffer, if applicable
funcfreefunc, if applicable
szbuffer size

Definition at line 55 of file IoCallback.cc.

References active(), assert, buf, callback, freefunc, NULL, offset, size, sz, and type.

Referenced by comm_read_base(), and Comm::Write().

Member Data Documentation

◆ buf

char* Comm::IoCallback::buf

Definition at line 35 of file IoCallback.h.

Referenced by setCallback().

◆ callback

AsyncCall::Pointer Comm::IoCallback::callback

Definition at line 34 of file IoCallback.h.

Referenced by active(), comm_read_cancel(), Comm::ReadCancel(), and setCallback().

◆ conn

◆ errcode

Comm::Flag Comm::IoCallback::errcode

Definition at line 39 of file IoCallback.h.

◆ freefunc

FREE* Comm::IoCallback::freefunc

Definition at line 36 of file IoCallback.h.

Referenced by setCallback().

◆ offset

int Comm::IoCallback::offset

Definition at line 38 of file IoCallback.h.

Referenced by setCallback().

◆ quotaQueueReserv

unsigned int Comm::IoCallback::quotaQueueReserv

Definition at line 42 of file IoCallback.h.

Referenced by ClientInfo::applyQuota(), and ClientInfo::scheduleWrite().

◆ size

int Comm::IoCallback::size

Definition at line 37 of file IoCallback.h.

Referenced by setCallback().

◆ type

iocb_type Comm::IoCallback::type

Definition at line 32 of file IoCallback.h.

Referenced by Comm::CallbackTableInit(), and setCallback().

◆ xerrno

int Comm::IoCallback::xerrno

Definition at line 40 of file IoCallback.h.


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors