28 clientConnection(xact->tcpClient),
29 transferProtocol(xact->squidPort->transport),
30 port(xact->squidPort),
31 receivedFirstByte_(false)
#define Assure(condition)
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
virtual bool doneAll() const
whether positive goal has been reached
int xerrno
The last errno to occur. non-zero if flag is Comm::COMM_ERROR.
Comm::Flag flag
comm layer result status.
Comm::ConnectionPointer conn
void leaveOrphanage()
resume relying on owner(s) to initiate an explicit connection closure
Named SBuf::reserve() parameters. Defaults ask for and restrict nothing.
bool allowShared
whether sharing our storage with others is OK
size_type minSpace
allocate [at least this much] if spaceSize() is smaller
size_type maxCapacity
do not allocate more than this
size_type idealSpace
if allocating anyway, provide this much space
size_type length() const
Returns the number of bytes stored in SBuf.
size_type reserve(const SBufReservationRequirements &requirements)
size_type spaceSize() const
virtual void afterClientRead()=0
processing to be done after a Comm::Read()
void readSomeData()
maybe grow the inBuf and schedule Comm::Read()
virtual void afterClientWrite(size_t)
processing to sync state after a Comm::Write()
bool doneAll() const override
whether positive goal has been reached
AsyncCall::Pointer reader
set when we are reading
void doClientRead(const CommIoCbParams &io)
void maybeMakeSpaceAvailable()
grows the available read buffer space (if possible)
virtual void writeSomeData()
maybe find some data to send and schedule a Comm::Write()
Comm::ConnectionPointer clientConnection
void clientWriteDone(const CommIoCbParams &io)
bool receivedFirstByte_
true if at least one byte received on this connection
void start() override
called by AsyncStart; do not call directly
void stopReading()
cancels Comm::Read() if it is scheduled
virtual bool handleReadData()=0
Server(const MasterXactionPointer &xact)
SBuf inBuf
read I/O buffer for the client connection
virtual void receivedFirstByte()=0
Update flags and timeout after the first byte received.
virtual void terminateAll(const Error &, const LogTagsErrors &)=0
abort any pending transactions and prevent new ones (by closing)
bool mayBufferMoreRequestBytes() const
whether client_request_buffer_max_size allows inBuf.length() increase
AsyncCall::Pointer writer
set when we are writing
bool reading() const
whether Comm::Read() is scheduled
virtual bool shouldCloseOnEof() const =0
whether to stop serving our client after reading EOF on its connection
size_t maxRequestBufferSize
struct StatCounters::@104 client_http
static ErrorDetail::Pointer NewIfAny(const int errorNo)
void commMarkHalfClosed(int fd)
#define debugs(SECTION, LEVEL, CONTENT)
#define CLIENT_REQ_BUF_SZ
void fd_note(int fd, const char *s)
void ReadCancel(int fd, AsyncCall::Pointer &callback)
Cancel the read pending on FD. No action if none pending.
void Read(const Comm::ConnectionPointer &conn, AsyncCall::Pointer &callback)
bool IsConnOpen(const Comm::ConnectionPointer &conn)
Comm::Flag ReadNow(CommIoCbParams ¶ms, SBuf &buf)
const char * xstrerr(int error)