[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: which? target_->recv(p) or send(pkt,0)
Shuqian Yan <[email protected]> writes:
> Hello, all
>
> What is the difference between the above two methods? and when should I
> use one and not the other one?
No, there is no difference. Agent::send is not even defined as
virtual. All it does is target_->recv(p, h).
Technically, we might want to define it as virtual and then send might
be doing something more than just packet handoff...
>
> (1) if I have two agents connected (being attached to different node
> object), and one agent is sending pkts to the other, should I use
> send(pkt,0)?
> (2) if I have a agent (being attached to a node object) and this agent is
> sending to a multicast group address, should I use target_->recv(p)?
>
> Anyone knows, pls tell me what is the difference?
>
> tks,
>
> shuqian