[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: WebCaching question
> I have a question about webcaching application.
> Suppose I have created the following http nodes:
>
> set client_(0) [new Http/Client $ns_ $node_(0)]
> set client_(1) [new Http/Client $ns_ $node_(1)]
> set cache_ [new Http/Cache/TTL $ns_ $node_(2)]
> set server_ [new Http/Server $ns_ $node_(3)]
>
> If I know the id of node_(2), and node_(3), I would like to refer back
> to cache_ and server_. How can I get the http node from node id?
You have to keep that association by yourself. For example, you can set an
array:
global httpmap
set httpmap([$node_(2) id]) $cache_
set httpmap([$node_(3) id]) $server_
Then you know that through this array.
- Haobo