[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] How to let a packet sleep a while?



Hi

You can use a timer for this. The idea is that when a new packet has to be
sent you only schedule the timer and the packet is actually sent later, when 
the timer expires.
You can check the use of delsnd_timer_ in TcpAgent::send_much() (tcp.cc),  

Dimitris.

On Tue, Jul 03, 2001 at 06:38:42PM -0400, Jianxue Huang wrote:
> Hi, everyone:
> 
> Does anybody know how to let a packet "sleep" a while, then, to be sent.
> When I implement a new protocol, I need to take the protocol execution
> time into account.  This means that the packet should stay in the start
> node for a while (this time is equal to the protocol execution time), then,
> is sent out.  But how to schedule it so that it can sleep for a while?
> 
> Thanks.
> 
> 
> Jan Huang