assert(requestBodySource != NULL);
assert(!requestSender);
- const Comm::ConnectionPointer conn = dataDescriptor();
+ const Comm::ConnectionPointer conn = dataConnection();
if (!Comm::IsConnOpen(conn)) {
debugs(9,3, HERE << "cannot send request body to closing " << conn);
virtual ~ServerStateData();
/// \return primary or "request data connection"
- virtual const Comm::ConnectionPointer & dataDescriptor() const = 0;
+ virtual const Comm::ConnectionPointer & dataConnection() const = 0;
// BodyConsumer: consume request body or adapted response body.
// The implementation just calls the corresponding HTTP or ICAP handle*()
if ((e = storeGetPublic(asres, METHOD_GET)) == NULL) {
e = storeCreateEntry(asres, asres, request_flags(), METHOD_GET);
asState->sc = storeClientListAdd(e, asState);
- Comm::ConnectionPointer nul;
- FwdState::fwdStart(nul, e, asState->request);
+ FwdState::fwdStart(Comm::ConnectionPointer(), e, asState->request);
} else {
e->lock();
* object for state data. But a semantic equivalent for FD with easily
* accessible cached properties not requiring repeated complex lookups.
*
- * While the properties may be changed, this is for teh purpose of creating
- * potential connection descriptors which may be opened. Properties should
- * be considered read-only outside of the Comm layer code once the connection
- * is open.
+ * Connection properties may be changed until tehe connection is opened.
+ * Properties should be considered read-only outside of the Comm layer
+ * code once the connection is open.
*
* These objects must not be passed around directly,
* but a Comm::ConnectionPointer must be passed instead.
class Connection : public RefCountable
{
public:
- /** standard empty connection creation */
Connection();
/** Clear the connection properties and close any open socket. */
/** Hierarchy code for this connection link */
hier_code peerType;
- /** Socket used by this connection. -1 if no socket has been opened. */
+ /** Socket used by this connection. Negative if not open. */
int fd;
/** Quality of Service TOS values currently sent on this connection */
void buildTitleUrl();
void writeReplyBody(const char *, size_t len);
void printfReplyBody(const char *fmt, ...);
- virtual const Comm::ConnectionPointer & dataDescriptor() const;
+ virtual const Comm::ConnectionPointer & dataConnection() const;
virtual void maybeReadVirginBody();
virtual void closeServer();
virtual void completeForwarding();
}
const Comm::ConnectionPointer &
-FtpStateData::dataDescriptor() const
+FtpStateData::dataConnection() const
{
return data.conn;
}
}
const Comm::ConnectionPointer &
-HttpStateData::dataDescriptor() const
+HttpStateData::dataConnection() const
{
return serverConnection;
}
HttpHeader * hdr_out,
const http_state_flags flags);
- virtual const Comm::ConnectionPointer & dataDescriptor() const;
+ virtual const Comm::ConnectionPointer & dataConnection() const;
/* should be private */
bool sendRequest();
void processReplyHeader();
urlCanonical(ex->r);
- Comm::ConnectionPointer nul;
- FwdState::fwdStart(nul, ex->e, ex->r);
+ FwdState::fwdStart(Comm::ConnectionPointer(), ex->e, ex->r);
#endif
}
/* push towards peer cache */
debugs(72, 3, "peerDigestRequest: forwarding to fwdStart...");
- Comm::ConnectionPointer nul;
- FwdState::fwdStart(nul, e, req);
+ FwdState::fwdStart(Comm::ConnectionPointer(), e, req);
tempBuffer.offset = 0;
if (urlres_e->isNull()) {
urlres_e = storeCreateEntry(urlres, urlres, request_flags(), METHOD_GET);
sc = storeClientListAdd(urlres_e, this);
- Comm::ConnectionPointer nul;
- FwdState::fwdStart(nul, urlres_e, urlres_r);
+ FwdState::fwdStart(Comm::ConnectionPointer(), urlres_e, urlres_r);
} else {
urlres_e->lock();