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

Re: NS-2




Komal,

In that case, you'll need to study 'proc done{}' and 'InitObject' class
first. A good example can be found in tcl/http/http.tcl.

Then, define your tcp srouce's done{} procedure to signal the ftp agent 
for another file transfer.

The way 'proc done{}' works is tricky.  I'm cc'ing this to the ns-user
list so others can elaborate more on this subject.

Regards,
-Polly

On Wed, 8 Jul 1998, krathi wrote:

> thanks for your reply...
> i want ftp to wait for 5ms after TCP has finished the entire file transfer
> and then ask TCP to send the next file. so i need to know the tricky
> solution.
> -komal
> 
> On Tue, 7 Jul 1998, Polly Huang wrote:
> 
> > 
> > On Tue, 7 Jul 1998, krathi wrote:
> > 
> > > 
> > > Hello:
> > > I am trying to do the following - get different file sizes (using tcplib)
> > > for each ftp source... and then get the source to send the file. then wait
> > > for say 5 ms and get the next file size and send packets again. but ftp
> > 
> > If you take a look at tcl/lib/ns-source.tcl, you'll see this 'producemore'
> > command for ftp sources.  It allows one ftp source to signal the connected
> > TCP agent to send the specified amount of packets.  The TCP agent will
> > gradually transmit the packets over the network (depending on the
> > congestion).  You can think of it as buffering  pkts from
> > application sources.
> > 
> > If you meant having the ftp source wait for 5 ms (for example) after
> > finishing singalling TCP the last transfer, it's fairly simple. Do this
> > 
> > $ns at [expr [$ns now] + 0.005] "$ftp producemore $pktnum"
> > 
> > suppoose $ftp is the ftp source, $pktnum is the number of pkts obtained
> > from tcplib.
> > 
> > If you meant have the ftp source wait for 5 ms after TCP agent has
> > completed tranmission of all outstanding packets, that'll be a little
> > tricky. Let me know if you need to know about the tricky solution
> > 
> > > does not indicate when it finishes a file transfer. Do you have any
> > > suggestions? 
> > > Thanks,
> > > Komal 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > 
> > 
> 
>