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

Re: [ns] delay command in NS



You can use the "done" call back for the TCP agent,
and schedule a future event at that time. For example:

Agent/TCP instproc done {} {
	set ns [Simulator instance]
	$ns at [expr [$ns now]+30.0] "$self send 20000"
}

By the way, the FTP session is not necessary if you are only sending 
information
in this fashion.

Enrique Campos-Nanez

On Thursday, May 17, 2001, at 07:45 PM, Huan Pham wrote:

>
> What I want to simulate now is to have a FTP  traffic source. It
> generate 20 packets, each of 1000 bytes. It waits until transmission
> finished.  Then it delays an random time (let's say 30 seconds in
> average, stands for user reading time) before keep produce another more
> 20 packets.
>
> Can anyone tell me, if NS know when FTP finishes transmission , and
> what is the command  to do "Delay 30 second "  in  NS.
>
> Thanks