Hi

using Router::visit_upstream/downstream() in this config elementA can 
find elementB:
elementA()->elementB();

But in this one it can not:
elementA();
elementB();

I mean consider some elements like ControlSocket, how can I find it from 
another element, please?

Here is how I use Router::visit_upstream/downstream():

ElementCastTracker filter(router() , "elementB" );
Element* e = router()->visit_upstream( this , 0 , &filter );
elementB* b = (elementB*)filter[0]->cast( "elementB" );

If the solution is Router::find(), I could not find an example of how to 
use it. when it returns an element, how should I cast it to use its members?

Any help is appreciated,
Hamid


_______________________________________________
click mailing list
[email protected]
https://amsterdam.lcs.mit.edu/mailman/listinfo/click

Reply via email to