11#ifndef SQUID_SRC_SERVERS_SERVER_H
12#define SQUID_SRC_SERVERS_SERVER_H
38 void start()
override;
79 void write(
char *buf,
int len) {
#define JobCallback(dbgSection, dbgLevel, Dialer, job, method)
Convenience macro to create a Dialer-based job callback.
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()
Pipeline pipeline
set of requests waiting to be serviced
bool doneAll() const override
whether positive goal has been reached
AsyncCall::Pointer reader
set when we are reading
void doClientRead(const CommIoCbParams &io)
void write(char *buf, int len)
schedule some data for a Comm::Write()
AnyP::ProtocolVersion transferProtocol
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
AnyP::PortCfgPointer port
Squid listening port details where this connection arrived.
void start() override
called by AsyncStart; do not call directly
void stopReading()
cancels Comm::Read() if it is scheduled
virtual bool handleReadData()=0
SBuf inBuf
read I/O buffer for the client connection
bool writing() const
whether Comm::Write() is scheduled
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
void write(MemBuf *mb)
schedule some data for a Comm::Write()
virtual bool shouldCloseOnEof() const =0
whether to stop serving our client after reading EOF on its connection
void Write(const Comm::ConnectionPointer &conn, const char *buf, int size, AsyncCall::Pointer &callback, FREE *free_func)