⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 node503.html

📁 相关搜索: ns2仿真结果分析 all-awk ns2 ns2 无限网络中awk文件 ... [2.tcl.rar] - 在ns2平台上实现对AODV协议的模拟
💻 HTML
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><!--Converted with jLaTeX2HTML 2002 (1.62) JA patch-1.4patched version by:  Kenshi Muto, Debian Project.LaTeX2HTML 2002 (1.62),original version by:  Nikos Drakos, CBLU, University of Leeds* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan* with significant contributions from:  Jens Lippmann, Marek Rouchal, Martin Wilck and others --><HTML><HEAD><TITLE>36.3 Representing web pages</TITLE><META NAME="description" CONTENT="36.3 Representing web pages"><META NAME="keywords" CONTENT="everything"><META NAME="resource-type" CONTENT="document"><META NAME="distribution" CONTENT="global"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"><META NAME="Generator" CONTENT="jLaTeX2HTML v2002 JA patch-1.4"><META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"><LINK REL="STYLESHEET" HREF="everything.css" tppabs="http://www.isi.edu/nsnam/ns/doc/everything.css"><LINK REL="next" HREF="node504.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node504.html"><LINK REL="previous" HREF="node497.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node497.html"><LINK REL="up" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html"><LINK REL="next" HREF="node504.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node504.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html9147"  HREF="node504.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node504.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html9141"  HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html9135"  HREF="node502.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node502.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html9143"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html9145"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html9148"  HREF="node504.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node504.html">36.4 Page pools</A><B> Up:</B> <A NAME="tex2html9142"  HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html">36. Web cache as</A><B> Previous:</B> <A NAME="tex2html9136"  HREF="node502.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node502.html">36.2.3 Debugging</A> &nbsp <B>  <A NAME="tex2html9144"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html9146"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H1><A NAME="SECTION07230000000000000000">36.3 Representing web pages</A></H1><P>We represent web pages as the abstract class Page. It is defined as follows:<P><PRE>class Page {public:        Page(int size) : size_(size) {}        int size() const { return size_; }        int&amp; id() { return id_; }        virtual WebPageType type() const = 0;protected:        int size_;        int id_;};</PRE><P>It represents the basic properties of a web page: size and URL. Uponit we derive two classes of web pages: ServerPage and ClientPage. Theformer contains a list of page modification times, and is supposed toby used by servers. It was originally designed to work with a specialweb server trace; currently it is not widely used in . The latter,ClientPage, is the default web page for all page pools below. <P>A ClientPage has the following major properties (we omit somevariables used by web cache with invalidation, which has too manydetails to be covered here):<P><UL><LI><TT>HttpApp* server_</TT> - Pointer to the original server of this  page. </LI><LI><TT>double age_</TT> - Lifetime of the page.</LI><LI><TT>int status_</TT> - Status of the page. Its contents are  explained below.</LI></UL><P>The status (32-bit) of a ClientPage is separated into two 16-bitparts. The first part (with mask 0x00FF) is used to store pagestatus, the second part (with mask 0xFF00) is used to store expectedpage actions to be performed by cache. Available page status are (again,we omit those closely related to web cache invalidation):<P><BR><BR><P>CilentPage has the following major C++ methods: <P><UL><LI><TT>type()</TT> - Returns the type of the page. Assuming pages of  the same type should have identical operations, we let all  ClientPage to be of type ``HTML''. If later on other types of web  pages are needed, a class may be derived from ClientPage (or Page)  with the desired type. </LI><LI><TT>name(char *buf)</TT> - Print the page's name into the given  buffer. A page's name is in the format of:  ServerName:PageID. </LI><LI><TT>split_name(const char *name, PageID&amp; id)</TT> - Split a given  page name into its two components. This is a static method. </LI><LI><TT>mtime()</TT> - Returns the last modification time of the page.</LI><LI><TT>age()</TT> - Returns the lifetime of the page. </LI></UL><P><HR><!--Navigation Panel--><A NAME="tex2html9147"  HREF="node504.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node504.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html9141"  HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html9135"  HREF="node502.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node502.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html9143"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html"><IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="file:/usr/share/latex2html/icons/contents.png"></A> <A NAME="tex2html9145"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html"><IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index" SRC="file:/usr/share/latex2html/icons/index.png"></A> <BR><B> Next:</B> <A NAME="tex2html9148"  HREF="node504.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node504.html">36.4 Page pools</A><B> Up:</B> <A NAME="tex2html9142"  HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html">36. Web cache as</A><B> Previous:</B> <A NAME="tex2html9136"  HREF="node502.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node502.html">36.2.3 Debugging</A> &nbsp <B>  <A NAME="tex2html9144"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html9146"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <!--End of Navigation Panel--><ADDRESS>2003-09-23</ADDRESS></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -