[请教] 这里这个 Dummy 是什么意思??
本帖最后由 yjh777 于 2011-04-22 09:46 编辑
如题: 文章里dummy这个单词怎么理解? 谢谢!
5.1 Dummy Subscriptions
-----------------------
It is sometimes useful to issue a "dummy" subscription to the TIPC topology
server -- that is, a subscription that has a time limit but will never match
any published name. Such a subscription will never generate any publish or
withdraw events, but will generate a timeout event when it expires.
For example, suppose an application wishes to report what nodes are present
in the network every minute. This can be accomplished as follows:
connect to TIPC topology server
send subscription for {0,1,2^^31-1}, time limit = none
send subscription for {1,0,0}, time limit = 60 seconds
set set of available nodes to "empty"
loop
receive event
if (event == publish)
add node to set of available nodes
else if (event == withdraw)
remove node from set of available nodes
else
send subscription for {1,0,0}, time limit = 60 seconds
print list of available nodes
end loop
. . .
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
貌似应该理解成"虚拟"