|
Squid Web Cache master
|
Modules | |
| Client Streams Internals | |
Functions | |
| void | clientStreamInit (dlink_list *, CSR *, CSD *, CSS *, const ClientStreamData &, CSCB *, CSD *, const ClientStreamData &, StoreIOBuffer tailBuffer) |
| void | clientStreamInsertHead (dlink_list *, CSR *, CSCB *, CSD *, CSS *, ClientStreamData) |
| void | clientStreamCallback (clientStreamNode *thisObject, ClientHttpRequest *http, HttpReply *rep, StoreIOBuffer replyBuffer) |
| void | clientStreamRead (clientStreamNode *thisObject, ClientHttpRequest *http, StoreIOBuffer readBuffer) |
| void | clientStreamDetach (clientStreamNode *thisObject, ClientHttpRequest *http) |
| void | clientStreamAbort (clientStreamNode *thisObject, ClientHttpRequest *http) |
| clientStream_status_t | clientStreamStatus (clientStreamNode *thisObject, ClientHttpRequest *http) |
TODO: ClientStreams: These details should really be codified as a class which all ClientStream nodes inherit from.
| void clientStreamAbort | ( | clientStreamNode * | thisObject, |
| ClientHttpRequest * | http | ||
| ) |
Detaches the tail of the stream. CURRENTLY DOES NOT clean up the tail node data - this must be done separately. Thus Abort may ONLY be called by the tail node.
| thisObject | 'this' reference for the client stream |
| http | MUST NOT be NULL. |
Abort the stream - detach every node in the pipeline.
| thisObject | ?? |
| http | ?? |
Definition at line 235 of file clientStream.cc.
References assert, clientStreamDetach(), dlink_node::data, debugs, clientStreamNode::head, and dlink_list::tail.
Referenced by ClientHttpRequest::freeResources().
| void clientStreamCallback | ( | clientStreamNode * | thisObject, |
| ClientHttpRequest * | http, | ||
| HttpReply * | rep, | ||
| StoreIOBuffer | replyBuffer | ||
| ) |
Call back the next node the in chain with it's requested data. Return data to the next node in the stream. The data may be returned immediately, or may be delayed for a later scheduling cycle.
| thisObject | 'this' reference for the client stream |
| http | Superset of request data, being winnowed down over time. MUST NOT be NULL. |
| rep | Not NULL on the first call back only. Ownership is passed down the pipeline. Each node may alter the reply if appropriate. |
| replyBuffer | - buffer, length - where and how much. |
Definition at line 150 of file clientStream.cc.
References assert, clientStreamNode::callback, clientStreamNode::data, debugs, clientStreamNode::next(), dlink_node::next, and clientStreamNode::node.
Referenced by clientReplyContext::processReplyAccessResult(), clientReplyContext::pushStreamData(), and clientReplyContext::sendStreamError().
| void clientStreamDetach | ( | clientStreamNode * | thisObject, |
| ClientHttpRequest * | http | ||
| ) |
Removes this node from a clientStream. The stream infrastructure handles the removal. This node MUST have cleaned up all context data, UNLESS scheduled callbacks will take care of that. Informs the prev node in the list of this nodes detachment.
| thisObject | 'this' reference for the client stream |
| http | MUST NOT be NULL. |
Detach from the stream - only allowed for terminal members
| thisObject | ?? |
| http | ?? |
Definition at line 192 of file clientStream.cc.
References assert, cbdataReference, cbdataReferenceDone, cbdataReferenceValid(), clientStreamNode::data, debugs, clientStreamNode::detach, RefCount< C >::getRaw(), dlink_node::next, clientStreamNode::node, clientStreamNode::prev(), and clientStreamNode::removeFromStream().
Referenced by clientReplyDetach(), clientSocketDetach(), clientStreamAbort(), downloaderDetach(), and Http::Stream::finished().
| void clientStreamInit | ( | dlink_list * | list, |
| CSR * | func, | ||
| CSD * | rdetach, | ||
| CSS * | readstatus, | ||
| const ClientStreamData & | readdata, | ||
| CSCB * | callback, | ||
| CSD * | cdetach, | ||
| const ClientStreamData & | callbackdata, | ||
| StoreIOBuffer | tailBuffer | ||
| ) |
Initialise a client Stream. list is the stream func is the read function for the head callback is the callback for the tail tailbuf and taillen are the initial buffer and length for the tail.
Definition at line 112 of file clientStream.cc.
References cbdataReference, clientStreamInsertHead(), dlink_node::data, dlinkAdd(), clientStreamNode::head, clientStreamNode::node, clientStreamNode::readBuffer, and dlink_list::tail.
Referenced by ConnStateData::abortRequestParsing(), ConnStateData::buildFakeRequest(), Downloader::buildRequest(), ConnStateData::parseHttpRequest(), and Ftp::Server::parseOneRequest().
| void clientStreamInsertHead | ( | dlink_list * | list, |
| CSR * | func, | ||
| CSCB * | callback, | ||
| CSD * | detach, | ||
| CSS * | status, | ||
| ClientStreamData | data | ||
| ) |
Doesn't actually insert at head. Instead it inserts one after head. This is because HEAD is a special node, as is tail This function is not suitable for inserting the real HEAD.
Definition at line 131 of file clientStream.cc.
References assert, cbdataReference, dlink_node::data, debugs, dlinkAddAfter(), RefCount< C >::getRaw(), clientStreamNode::head, dlink_list::head, dlink_node::next, clientStreamNode::node, and clientStreamNode::readBuffer.
Referenced by clientStreamInit().
| void clientStreamRead | ( | clientStreamNode * | thisObject, |
| ClientHttpRequest * | http, | ||
| StoreIOBuffer | readBuffer | ||
| ) |
Triggers a read of data that satisfies the httpClientRequest metainformation and (if appropriate) the offset,length and buffer parameters.
| thisObject | 'this' reference for the client stream |
| http | Superset of request data, being winnowed down over time. MUST NOT be NULL. |
| readBuffer | - offset, length, buffer - what, how much and where. |
Call the previous node in the chain to read some data
| thisObject | ?? |
| http | ?? |
| readBuffer | ?? |
Definition at line 170 of file clientStream.cc.
References assert, clientStreamNode::data, debugs, RefCount< C >::getRaw(), clientStreamNode::prev(), clientStreamNode::readBuffer, and clientStreamNode::readfunc.
Referenced by constructHelperQuery(), ClientHttpRequest::doCallouts(), Downloader::handleReply(), ClientRequestContext::hostHeaderVerifyFailed(), ClientHttpRequest::httpStart(), and Http::Stream::pullData().
| clientStream_status_t clientStreamStatus | ( | clientStreamNode * | thisObject, |
| ClientHttpRequest * | http | ||
| ) |
Allows nodes to query the upstream nodes for :
| thisObject | 'this' reference for the client stream |
| http | MUST NOT be NULL. |
Call the upstream node to find it's status
| thisObject | ?? |
| http | ?? |
Definition at line 257 of file clientStream.cc.
References assert, dlink_node::data, clientStreamNode::node, dlink_node::prev, and clientStreamNode::status.
Referenced by Downloader::handleReply(), and Http::Stream::socketState().