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

📄 node231.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>20.4.1 Ping Application as implemented in C++</TITLE><META NAME="description" CONTENT="20.4.1 Ping Application as implemented in C++"><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="node232.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node232.html"><LINK REL="previous" HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><LINK REL="up" HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><LINK REL="next" HREF="node232.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node232.html"></HEAD><BODY ><!--Navigation Panel--><A NAME="tex2html4806"  HREF="node232.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node232.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4800"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4794"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4802"  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="tex2html4804"  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="tex2html4807"  HREF="node232.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node232.html">20.4.2 Tcl APIs for</A><B> Up:</B> <A NAME="tex2html4801"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html">20.4 Ping: an example</A><B> Previous:</B> <A NAME="tex2html4795"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html">20.4 Ping: an example</A> &nbsp <B>  <A NAME="tex2html4803"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html4805"  HREF="node590.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node590.html">Index</A></B> <BR><BR><!--End of Navigation Panel--><H2><A NAME="SECTION031741000000000000000"></A><A NAME="sec:ping_cpp"></A><BR>20.4.1 Ping Application as implemented in C++</H2><P>The ping-sender and -receiver classes, namely PingSenderApp and PingReceiverApp both derive from DiffApp, the parent class for all diffusion based applications. See diffusion3/lib/diffapp{.cc,.hh} for detailed implementation of the DiffApp class.<P>The ping-sender uses MySenderReceive object that handles all callbacks for it. Also the ping-sender defines two functions setupSubscription() and setupPublication(). The first function creates interest attributes that matches with data attributes it (the sender) has to offer. Next it calls the dr-library function subscribe(). The subscription is used by the ping-sender to create an internal state against which attributes for interests received from the network are matched against. Incase of a match, the matching data is sent outinto the network. Function setupPublication() create attributes for the data it has to offer and calls the library function publish() which inturn returns a publish handle. The ping-sender uses this handle to periodically send out data which is forwarded by the gradient to core-diffusion to be sent out into the network only if it finds a matching interest.<P>The ping-receiver object uses a similar callback object called MyReceiverReceive. And it defines a function setupSubscription() that creates attributes for the interest the receiver will be sending. Next it calls the dr library supported subscribe() which sends the interest out into the network. The recv() function is used to recv matching data and the receiver then calculates the latency for each data packet received from the ping-sender.The ping sender can be found under ping_sender.cc,.h. And the ping_receiver is implemented under ping_receiver.cc,.h. Some common defines and attribute factories for data/interest attributes are defined in ping.hh and ping_common.cc.<P><HR><!--Navigation Panel--><A NAME="tex2html4806"  HREF="node232.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node232.html"><IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/share/latex2html/icons/next.png"></A> <A NAME="tex2html4800"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/share/latex2html/icons/up.png"></A> <A NAME="tex2html4794"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html"><IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/share/latex2html/icons/prev.png"></A> <A NAME="tex2html4802"  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="tex2html4804"  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="tex2html4807"  HREF="node232.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node232.html">20.4.2 Tcl APIs for</A><B> Up:</B> <A NAME="tex2html4801"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html">20.4 Ping: an example</A><B> Previous:</B> <A NAME="tex2html4795"  HREF="node230.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node230.html">20.4 Ping: an example</A> &nbsp <B>  <A NAME="tex2html4803"  HREF="node1.html" tppabs="http://www.isi.edu/nsnam/ns/doc/node1.html">Contents</A></B>  &nbsp <B>  <A NAME="tex2html4805"  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 + -