/*
- * $Id: splay.h,v 1.17 2003/03/04 01:40:22 robertc Exp $
+ * $Id: splay.h,v 1.18 2003/03/06 11:51:55 robertc Exp $
*/
#ifndef SQUID_SPLAY_H
public:
typedef V Value;
typedef int SPLAYCMP(Value const &a, Value const &b);
- Splay():head(NULL){}
+ Splay():head(NULL), elements (0){}
mutable SplayNode<V> * head;
Value const *find (Value const &, SPLAYCMP *compare) const;
+ void insert(Value const &, SPLAYCMP *compare);
+ void remove(Value const &, SPLAYCMP *compare);
+ size_t elements;
};
SplayNode<V> *newNode = new SplayNode<V>;
newNode->data = data;
if (this == NULL) {
+ splayLastResult = -1;
newNode->left = newNode->right = NULL;
return newNode;
}
return &head->data;
}
+template <class V>
+void
+Splay<V>::insert(Value const &value, SPLAYCMP *compare)
+{
+ assert (!find (value, compare));
+ head = head->insert(value, compare);
+ ++elements;
+}
+
+template <class V>
+void
+Splay<V>::remove(Value const &value, SPLAYCMP *compare)
+{
+ assert (find (value, compare));
+ head = head->remove(value, compare);
+ --elements;
+}
+
#endif
#endif /* SQUID_SPLAY_H */
/*
- * $Id: DelayUser.h,v 1.3 2003/02/21 22:50:05 robertc Exp $
+ * $Id: DelayUser.h,v 1.4 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
DelayUserBucket::Pointer theBucket;
};
+ friend class Id;
+
DelaySpec spec;
Splay<DelayUserBucket::Pointer> buckets;
};
/*
- * $Id: DelayVector.h,v 1.4 2003/03/04 01:40:25 robertc Exp $
+ * $Id: DelayVector.h,v 1.5 2003/03/06 11:51:55 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef Vector<DelayIdComposite::Pointer>::const_iterator const_iterator;
};
+ friend class Id;
+
Vector<CompositePoolNode::Pointer> pools;
typedef Vector<CompositePoolNode::Pointer>::iterator iterator;
typedef Vector<CompositePoolNode::Pointer>::const_iterator const_iterator;
/*
- * $Id: HttpHdrExtField.cc,v 1.11 2003/02/21 22:50:05 robertc Exp $
+ * $Id: HttpHdrExtField.cc,v 1.12 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 69 HTTP Header: Extension Field
* AUTHOR: Alex Rousskov
httpHdrExtFieldDoCreate(const char *name, int name_len,
const char *value, int value_len)
{
- HttpHdrExtField *f = xcalloc(1, sizeof(HttpHdrExtField));
+ HttpHdrExtField *f = new HttpHdrExtField;
stringLimitInit(&f->name, name, name_len);
stringLimitInit(&f->value, value, value_len);
return f;
assert(f);
f->name.clean();
f->value.clean();
- xfree(f);
+ delete f;
}
HttpHdrExtField *
/*
- * $Id: HttpHeader.cc,v 1.86 2003/03/06 06:21:36 robertc Exp $
+ * $Id: HttpHeader.cc,v 1.87 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 55 HTTP Header
* AUTHOR: Alex Rousskov
{
HttpHeaderEntry *e;
assert_eid(id);
- e = (HttpHeaderEntry *)memAllocate(MEM_HTTP_HDR_ENTRY);
+ e = new HttpHeaderEntry;
e->id = id;
if (id != HDR_OTHER)
e->id = HDR_BAD_HDR;
- memFree(e, MEM_HTTP_HDR_ENTRY);
+ delete e;
}
/* parses and inits header entry, returns new entry on success */
}
/* now we know we can parse it */
- e = (HttpHeaderEntry *)memAllocate(MEM_HTTP_HDR_ENTRY);
+ e = new HttpHeaderEntry;
debug(55, 9) ("creating entry %p: near '%s'\n", e, getStringPrefix(field_start, field_end));
if (e->id == HDR_OTHER)
e->name.clean();
- memFree(e, MEM_HTTP_HDR_ENTRY);
+ delete e;
return NULL;
}
return HeadersAttrs[id].name;
}
+
+MemPool *HttpHeaderEntry::Pool(NULL);
+void *
+HttpHeaderEntry::operator new (size_t byteCount)
+{
+ /* derived classes with different sizes must implement their own new */
+ assert (byteCount == sizeof (HttpHeaderEntry));
+
+ if (!Pool)
+ Pool = memPoolCreate("HttpHeaderEntry", sizeof (HttpHeaderEntry));
+
+ return memPoolAlloc(Pool);
+}
+
+void
+HttpHeaderEntry::operator delete (void *address)
+{
+ memPoolFree (Pool, address);
+}
/*
- * $Id: HttpHeaderRange.h,v 1.2 2003/02/21 22:50:05 robertc Exp $
+ * $Id: HttpHeaderRange.h,v 1.3 2003/03/06 11:51:55 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#include "Range.h"
-typedef struct _HttpReply HttpReply;
+class HttpReply;
/* http byte-range-spec */
class HttpHdrRangeSpec
/*
- * $Id: HttpHeaderTools.cc,v 1.39 2003/03/06 06:21:37 robertc Exp $
+ * $Id: HttpHeaderTools.cc,v 1.40 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 66 HTTP Header Tools
* AUTHOR: Alex Rousskov
assert(attrs && count);
/* allocate space */
- table = (HttpHeaderFieldInfo *)xcalloc(count, sizeof(HttpHeaderFieldInfo));
+ table = new HttpHeaderFieldInfo[count];
for (i = 0; i < count; ++i) {
const http_hdr_type id = attrs[i].id;
/* sanity checks */
assert(id >= 0 && id < count);
assert(attrs[i].name);
- assert(info->id == 0 && info->type == 0); /* was not set before */
+ assert(info->id == HDR_ACCEPT && info->type == ftInvalid); /* was not set before */
/* copy and init fields */
info->id = id;
info->type = attrs[i].type;
info->name = attrs[i].name;
assert(info->name.size());
- /* init stats */
- memset(&info->stat, 0, sizeof(info->stat));
}
return table;
for (i = 0; i < count; ++i)
table[i].name.clean();
- xfree(table);
+ delete table;
}
void
/*
- * $Id: HttpReply.cc,v 1.55 2003/03/06 06:21:37 robertc Exp $
+ * $Id: HttpReply.cc,v 1.56 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 58 HTTP Reply (Response)
* AUTHOR: Alex Rousskov
HttpReply *
httpReplyCreate(void)
{
- HttpReply *rep = (HttpReply *)memAllocate(MEM_HTTP_REPLY);
+ HttpReply *rep = new HttpReply;
debug(58, 7) ("creating rep: %p\n", rep);
httpReplyInit(rep);
return rep;
static void
httpReplyDoDestroy(HttpReply * rep)
{
- memFree(rep, MEM_HTTP_REPLY);
+ delete rep;
}
static time_t
delete checklist;
}
}
+
+MemPool *HttpReply::Pool(NULL);
+void *
+HttpReply::operator new (size_t byteCount)
+{
+ /* derived classes with different sizes must implement their own new */
+ assert (byteCount == sizeof (HttpReply));
+
+ if (!Pool)
+ Pool = memPoolCreate("HttpReply", sizeof (HttpReply));
+
+ return memPoolAlloc(Pool);
+}
+
+void
+HttpReply::operator delete (void *address)
+{
+ memPoolFree (Pool, address);
+}
/*
- * $Id: SquidString.h,v 1.3 2003/03/06 06:21:37 robertc Exp $
+ * $Id: SquidString.h,v 1.4 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
#ifndef SQUID_STRING_H
#define SQUID_STRING_H
+#define DEBUGSTRINGS 0
+#if DEBUGSTRINGS
+#include "splay.h"
+
+class String;
+
+class StringRegistry
+{
+
+public:
+ StringRegistry() : registered(false) {}
+
+ static StringRegistry &Instance();
+
+ void add
+ (String const *);
+
+ void remove
+ (String const *);
+
+private:
+ static OBJH Stat;
+
+ static StringRegistry Instance_;
+
+ static SplayNode<String const *>::SPLAYWALKEE Stater;
+
+ Splay<String const *> entries;
+
+ bool registered;
+
+ void registerMe();
+};
+
+class StoreEntry;
+#endif
+
class String
{
_SQUID_INLINE_ void cutPointer (char const *loc);
+#if DEBUGSTRINGS
+
+ void stat (StoreEntry *) const;
+
+#endif
+
private:
/* never reference these directly! */
unsigned short int size_; /* buffer size; 64K limit */
/*
- * $Id: String.cc,v 1.14 2003/03/06 06:21:37 robertc Exp $
+ * $Id: String.cc,v 1.15 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
*/
#include "squid.h"
+#include "Store.h"
void
String::initBuf(size_t sz)
{
- buf_ = (char *)memAllocString(sz, &sz);
+ buf((char *)memAllocString(sz, &sz));
assert(sz < 65536);
size_ = sz;
}
String::String (char const *aString) : size_(0), len_(0), buf_(NULL)
{
init (aString);
+ StringRegistry::Instance().add(this);
}
String &
clean ();
if (old.len_)
- limitInit (old.buf_, old.len_);
+ limitInit (old.buf(), old.len_);
return *this;
}
String::String (String const &old) : size_(0), len_(0), buf_(NULL)
{
- init (old.buf_);
+ init (old.buf());
+ StringRegistry::Instance().add(this);
}
void
{
assert(this);
- if (buf_)
+ if (buf())
memFreeString(size_, buf_);
len_ = 0;
String::~String()
{
clean();
+ StringRegistry::Instance().remove(this);
}
void
snew.initBuf(snew.len_ + 1);
if (buf_)
- xmemcpy(snew.buf_, buf_, len_);
+ xmemcpy(snew.buf_, buf(), len_);
if (len)
xmemcpy(snew.buf_ + len_, str, len);
void
String::append(String const &old)
{
- append (old.buf_, old.len_);
+ append (old.buf(), old.len_);
}
void
{
clean();
size_ = old.size_;
- buf_ = old.buf_;
+ buf (old.buf_);
len_ = old.len_;
old.size_ = 0;
old.buf_ = NULL;
buf_ = newBuf;
}
+#if DEBUGSTRINGS
+void
+String::stat(StoreEntry *entry) const
+{
+ storeAppendPrintf(entry, "%p : %d/%d \"%s\"\n",this,len_, size_, buf());
+}
+
+StringRegistry &
+StringRegistry::Instance()
+{
+ return Instance_;
+}
+
+template <class C>
+int
+ptrcmp(C const &lhs, C const &rhs)
+{
+ return lhs - rhs;
+}
+
+void
+StringRegistry::registerMe()
+{
+ registered = true;
+ cachemgrRegister("strings",
+ "Strings in use in squid", Stat, 0, 1);
+}
+
+void
+
+StringRegistry::add
+ (String const *entry)
+{
+ if (!registered)
+ registerMe();
+
+ entries.insert(entry, ptrcmp);
+}
+
+void
+
+StringRegistry::remove
+ (String const *entry)
+{
+ entries.remove(entry, ptrcmp);
+}
+
+StringRegistry StringRegistry::Instance_;
+
+extern size_t memStringCount();
+
+void
+StringRegistry::Stat(StoreEntry *entry)
+{
+ storeAppendPrintf(entry, "%lu entries, %lu reported from MemPool\n", (unsigned long) Instance().entries.elements, (unsigned long) memStringCount());
+ Instance().entries.head->walk(Stater, entry);
+}
+
+void
+StringRegistry::Stater(String const * const & nodedata, void *state)
+{
+ StoreEntry *entry = (StoreEntry *) state;
+ nodedata->stat(entry);
+}
+
+#endif
+
#ifndef _USE_INLINE_
#include "String.cci"
#endif
/*
- * $Id: String.cci,v 1.2 2003/03/06 06:21:37 robertc Exp $
+ * $Id: String.cci,v 1.3 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 67 String
* AUTHOR: Duane Wessels
*/
String::String() : size_(0), len_(0), buf_ (NULL)
-{}
+{
+#if DEBUGSTRINGS
+ StringRegistry::Instance().add(this);
+#endif
+}
int
String::size() const
/*
- * $Id: client_side_reply.cc,v 1.43 2003/03/04 01:40:26 robertc Exp $
+ * $Id: client_side_reply.cc,v 1.44 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 88 Client-side Reply Routines
* AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
assert(mem != NULL);
assert(http->request != NULL);
/* mem->reply was wrong because it uses the UPSTREAM header length!!! */
- http_reply const *reply = mem->getReply();
+ HttpReply const *reply = mem->getReply();
if (headers_sz == 0)
/* haven't found end of headers yet */
/*
- * $Id: delay_pools.cc,v 1.36 2003/03/04 06:22:12 robertc Exp $
+ * $Id: delay_pools.cc,v 1.37 2003/03/06 11:51:55 robertc Exp $
*
* DEBUG: section 77 Delay Pools
* AUTHOR: Robert Collins <robertc@squid-cache.org>
DelaySpec spec;
VectorMap<unsigned char, ClassCBucket> buckets;
+ class Id;
+
+ friend class ClassCHostPool::Id;
+
class Id:public DelayIdComposite
{
/*
- * $Id: enums.h,v 1.228 2003/02/25 12:22:34 robertc Exp $
+ * $Id: enums.h,v 1.229 2003/03/06 11:51:55 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
MEM_HELPER_STATEFUL_REQUEST,
MEM_HTTP_HDR_CC,
MEM_HTTP_HDR_CONTENT_RANGE,
- MEM_HTTP_HDR_ENTRY,
- MEM_HTTP_REPLY,
MEM_IPCACHE_ENTRY,
MEM_MD5_DIGEST,
MEM_NETDBENTRY,
/*
- * $Id: ftp.cc,v 1.347 2003/03/06 06:21:37 robertc Exp $
+ * $Id: ftp.cc,v 1.348 2003/03/06 11:51:56 robertc Exp $
*
* DEBUG: section 9 File Transfer Protocol (FTP)
* AUTHOR: Harvest Derived
1;
};
-typedef struct _Ftpdata
+class FtpStateData
{
+
+public:
+ void *operator new (size_t);
+ void operator delete (void *);
+ void deleteSelf() const;
+ ~FtpStateData();
StoreEntry *entry;
request_t *request;
char user[MAX_URL];
struct _ftp_flags flags;
FwdState *fwd;
+
+private:
+ CBDATA_CLASS(FtpStateData);
+};
+
+CBDATA_CLASS_INIT(FtpStateData);
+
+void *
+FtpStateData::operator new (size_t)
+{
+ CBDATA_INIT_TYPE(FtpStateData);
+ FtpStateData *result = cbdataAlloc(FtpStateData);
+ return result;
}
-FtpStateData;
+void
+FtpStateData::operator delete (void *address)
+{
+ FtpStateData *t = static_cast<FtpStateData *>(address);
+ cbdataFree(t);
+}
+
+void
+FtpStateData::deleteSelf () const
+{
+ delete this;
+}
typedef struct
{
ftpStateFree(int fdnotused, void *data)
{
FtpStateData *ftpState = (FtpStateData *)data;
- cbdataFree(ftpState);
+ ftpState->deleteSelf();
}
-static void
-ftpStateFreed(void *data)
+FtpStateData::~FtpStateData()
{
- FtpStateData *ftpState = (FtpStateData *)data;
+ FtpStateData *ftpState = this;
if (ftpState == NULL)
return;
ftpState->base_href.append("/");
}
-CBDATA_TYPE(FtpStateData);
void
ftpStart(FwdState * fwd)
{
FtpStateData *ftpState;
HttpReply *reply;
- CBDATA_INIT_TYPE_FREECB(FtpStateData, ftpStateFreed);
- ftpState = cbdataAlloc(FtpStateData);
+ ftpState = new FtpStateData;
debug(9, 3) ("ftpStart: '%s'\n", url);
statCounter.server.all.requests++;
statCounter.server.ftp.requests++;
const char *filename = NULL;
const char *t = NULL;
StoreEntry *e = ftpState->entry;
- http_reply *reply = httpReplyCreate ();
+ HttpReply *reply = httpReplyCreate ();
http_version_t version;
if (ftpState->flags.http_header_sent)
/*
- * $Id: mem.cc,v 1.75 2003/02/25 12:24:35 robertc Exp $
+ * $Id: mem.cc,v 1.76 2003/03/06 11:51:56 robertc Exp $
*
* DEBUG: section 13 High Level Memory Pool Management
* AUTHOR: Harvest Derived
return pool ? memPoolAlloc(pool) : xcalloc(1, net_size);
}
+extern size_t memStringCount();
+size_t
+memStringCount()
+{
+ size_t result = 0;
+
+ for (int counter = 0; counter < mem_str_pool_count; ++counter)
+ result += memPoolInUseCount(StrPools[counter].pool);
+
+ return result;
+}
+
/* free buffer allocated with memAllocString() */
void
memFreeString(size_t size, void *buf)
memDataInit(MEM_DREAD_CTRL, "dread_ctrl", sizeof(dread_ctrl), 0);
memDataInit(MEM_DWRITE_Q, "dwrite_q", sizeof(dwrite_q), 0);
memDataInit(MEM_FWD_SERVER, "FwdServer", sizeof(FwdServer), 0);
- memDataInit(MEM_HTTP_REPLY, "HttpReply", sizeof(HttpReply), 0);
- memDataInit(MEM_HTTP_HDR_ENTRY, "HttpHeaderEntry", sizeof(HttpHeaderEntry), 0);
memDataInit(MEM_HTTP_HDR_CC, "HttpHdrCc", sizeof(HttpHdrCc), 0);
memDataInit(MEM_HTTP_HDR_CONTENT_RANGE, "HttpHdrContRange", sizeof(HttpHdrContRange), 0);
memDataInit(MEM_NETDBENTRY, "netdbEntry", sizeof(netdbEntry), 0);
/*
- * $Id: net_db.cc,v 1.169 2003/02/21 22:50:10 robertc Exp $
+ * $Id: net_db.cc,v 1.170 2003/03/06 11:51:56 robertc Exp $
*
* DEBUG: section 38 Network Measurement Database
* AUTHOR: Duane Wessels
void
netdbBinaryExchange(StoreEntry * s)
{
- http_reply *reply = httpReplyCreate();
+ HttpReply *reply = httpReplyCreate();
http_version_t version;
#if USE_ICMP
/*
- * $Id: peer_digest.cc,v 1.95 2003/02/21 22:50:10 robertc Exp $
+ * $Id: peer_digest.cc,v 1.96 2003/03/06 11:51:56 robertc Exp $
*
* DEBUG: section 72 Peer Digest Routines
* AUTHOR: Alex Rousskov
pd->host.clean();
}
-CBDATA_TYPE(PeerDigest);
+CBDATA_CLASS_INIT(PeerDigest);
+
+void *
+PeerDigest::operator new (size_t)
+{
+ CBDATA_INIT_TYPE(PeerDigest);
+ PeerDigest *result = cbdataAlloc(PeerDigest);
+ return result;
+}
+
+void
+PeerDigest::operator delete (void *address)
+{
+ PeerDigest *t = static_cast<PeerDigest *>(address);
+ cbdataFree(t);
+}
+
+void
+PeerDigest::deleteSelf () const
+{
+ delete this;
+}
/* allocate new peer digest, call Init, and lock everything */
PeerDigest *
PeerDigest *pd;
assert(p);
- CBDATA_INIT_TYPE(PeerDigest);
- pd = cbdataAlloc(PeerDigest);
+ pd = new PeerDigest;
peerDigestInit(pd, p);
/* XXX This does not look right, and the same thing again in the caller */
peerDigestClean(pd);
- cbdataFree(pd);
+ pd->deleteSelf();
}
/* called by peer to indicate that somebody actually needs this digest */
/*
- * $Id: protos.h,v 1.470 2003/03/04 01:40:29 robertc Exp $
+ * $Id: protos.h,v 1.471 2003/03/06 11:51:57 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
/* http.c */
SQUIDCEXTERN int httpCachable(method_t);
SQUIDCEXTERN void httpStart(FwdState *);
-SQUIDCEXTERN void httpParseReplyHeaders(const char *, http_reply *);
+SQUIDCEXTERN void httpParseReplyHeaders(const char *, HttpReply *);
SQUIDCEXTERN mb_size_t httpBuildRequestPrefix(request_t * request,
request_t * orig_request,
StoreEntry * entry,
/*
- * $Id: structs.h,v 1.456 2003/03/04 01:40:31 robertc Exp $
+ * $Id: structs.h,v 1.457 2003/03/06 11:51:57 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
#include "SquidString.h"
/* http header extention field */
-struct _HttpHdrExtField
+class HttpHdrExtField
{
String name; /* field-name from HTTP/1.1 (no column after name) */
String value; /* field-value from HTTP/1.1 */
/* per field statistics */
-struct _HttpHeaderFieldStat
+class HttpHeaderFieldStat
{
+
+public:
+ HttpHeaderFieldStat() : aliveCount(0), seenCount(0), parsCount(0), errCount(0), repCount(0){}
+
int aliveCount; /* created but not destroyed (count) */
int seenCount; /* #fields we've seen */
int parsCount; /* #parsing attempts */
/* compiled version of HttpHeaderFieldAttrs plus stats */
-struct _HttpHeaderFieldInfo
+class HttpHeaderFieldInfo
{
+
+public:
+ HttpHeaderFieldInfo() : id (HDR_ACCEPT), type (ftInvalid){}
+
http_hdr_type id;
String name;
field_type type;
HttpHeaderFieldStat stat;
};
-struct _HttpHeaderEntry
+class HttpHeaderEntry
{
+
+public:
+ void *operator new (size_t);
+ void operator delete (void *);
http_hdr_type id;
String name;
String value;
+
+private:
+ static MemPool *Pool;
};
struct _HttpHeader
class HttpHdrContRange;
-struct _HttpReply
+class HttpReply
{
+
+public:
+ void *operator new (size_t);
+ void operator delete (void *);
/* unsupported, writable, may disappear/change in the future */
int hdr_sz; /* sums _stored_ status-line, headers, and <CRLF> */
HttpHeader header;
HttpBody body; /* for small constant memory-resident text bodies only */
size_t maxBodySize;
+
+private:
+ static MemPool *Pool;
};
struct _http_state_flags
int close_hits; /* tmp, remove it later */
};
-struct _PeerDigest
+class PeerDigest
{
+public:
+ void *operator new (size_t);
+ void operator delete(void *);
+ void deleteSelf() const;
+
struct _peer *peer; /* pointer back to peer structure, argh */
CacheDigest *cd; /* actual digest structure */
String host; /* copy of peer->host */
}
stats;
+
+private:
+ CBDATA_CLASS(PeerDigest);
};
#endif
/*
- * $Id: typedefs.h,v 1.157 2003/03/04 01:40:31 robertc Exp $
+ * $Id: typedefs.h,v 1.158 2003/03/06 11:51:58 robertc Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
typedef struct _fileMap fileMap;
-typedef struct _HttpReply http_reply;
-
typedef struct _HttpStatusLine HttpStatusLine;
typedef struct _HttpHeaderFieldAttrs HttpHeaderFieldAttrs;
-typedef struct _HttpHeaderFieldInfo HttpHeaderFieldInfo;
+class HttpHeaderFieldInfo;
typedef struct _HttpHeader HttpHeader;
typedef struct _TimeOrTag TimeOrTag;
-typedef struct _HttpHeaderEntry HttpHeaderEntry;
+class HttpHeaderEntry;
-typedef struct _HttpHeaderFieldStat HttpHeaderFieldStat;
+class HttpHeaderFieldStat;
typedef struct _HttpHeaderStat HttpHeaderStat;
typedef struct _HttpBody HttpBody;
-typedef struct _HttpReply HttpReply;
+class HttpReply;
typedef struct _ConnCloseHelperData ConnCloseHelperData;
typedef struct _DigestFetchState DigestFetchState;
-typedef struct _PeerDigest PeerDigest;
+class PeerDigest;
typedef struct _peer peer;