📄 node515.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.6 Web server</TITLE><META NAME="description" CONTENT="36.6 Web server"><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="node516.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node516.html"><LINK REL="previous" HREF="node510.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node510.html"><LINK REL="up" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html"><LINK REL="next" HREF="node516.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node516.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html9320" HREF="node516.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node516.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html9314" 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="tex2html9308" HREF="node514.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node514.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html9316" 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="tex2html9318" 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="tex2html9321" HREF="node516.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node516.html">36.7 Web cache</A><B> Up:</B> <A NAME="tex2html9315" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html">36. Web cache as</A><B> Previous:</B> <A NAME="tex2html9309" HREF="node514.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node514.html">36.5.0.0.4 OTcl interfaces</A>   <B> <A NAME="tex2html9317" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html9319" 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="SECTION07260000000000000000"></A><A NAME="seccom:webcache-server"></A><BR>36.6 Web server</H1><P>Class Http/Server models behavior of a HTTP server. Itsconfiguration is very simple. All that a user needs to do is to create a server, attach a PagePool and wait:<P><PRE> set server [new Http/Server $ns $node] # attach \$server to \$node; $server set-page-generator $pgp # attach a page pool;</PRE><P>An Http/Server object waits for incoming requests after simulation starts.Usually clients and caches initiates connection to an Http/Server. But it still has its own <TT>connect</TT> method, which allows an Http/Server object to actively connect to a certain cache (or client). Sometimes thisis useful, as explained in Test/TLC1::set-groups{} in /tcl/test/test-suite-webcache.tcl.<P>An Http/Server object accepts two types of requests: GET and IMS. GETrequest models normal client requests. For every GET request, itreturns the attributes of the requested page. IMS request modelsIf-Modified-Since used by TTL algorithms for cache consistency. Forevery IMS (If-Modified-Since) request, it compares the pagemodification time given in the request and that of the page in itsPagePool. If the time indicated in the request is older, it sends backa response with very small size, otherwise it returns all of the page attributes with response size equal the real page size.<P><HR><!--Navigation Panel--><A NAME="tex2html9320" HREF="node516.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node516.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html9314" 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="tex2html9308" HREF="node514.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node514.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html9316" 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="tex2html9318" 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="tex2html9321" HREF="node516.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node516.html">36.7 Web cache</A><B> Up:</B> <A NAME="tex2html9315" HREF="node490.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node490.html">36. Web cache as</A><B> Previous:</B> <A NAME="tex2html9309" HREF="node514.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node514.html">36.5.0.0.4 OTcl interfaces</A>   <B> <A NAME="tex2html9317" HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>   <B> <A NAME="tex2html9319" 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 + -