Hello ns users,
   
     I'm trying to create "n" FTP connections from n computers to  n computers 
(in pairs), connected through a node. I want to start a connection at second 0, 
and then close it after a second and in the same time open another. I don't 
know why, but the connections won't start.
      Please help. ....I'm attaching the code here:
   
    for {set i 1} {$i <= $clienti_num} {incr i} {
      set tcp [new Agent/TCP]
      set sink [new Agent/TCPSink]
      $ns attach-agent $sfile($i) $tcp
      $ns attach-agent $peer($i) $sink
      $ns connect $tcp $sink
      $tcp set fid_ $i
      $tcp set window_ 20
      $tcp set packetSize_ 100
 
        set ftp($i) [new Application/FTP]
      $ftp($i) attach-agent $tcp
      $ftp($i) set type_ FTP
     }
   
   for {set i 1} {$i <= $clienti_num} {incr i} {
        $ns at $i-1 "$ftp start"
      $ns at $i "$ftp($i) stop"
      }   

                
---------------------------------
Do you Yahoo!?
 Next-gen email? Have it all with the  all-new Yahoo! Mail Beta.

Reply via email to