ns-allinone-2.35/ns-2.35/baytcp/ftpc.cc
void FtpClientAgent::recv(Packet*, BayFullTcpAgent*, int code)
{
  //at data complete time, schedule a "far out" event to ensure
  // simulator doesn't terminate
  if(running_ && code == DATA_PUSH) {
  state_ = DATA_RCVD;
  newfile_timer_.resched(5.0);
  }
  else if(running_ && code == CONNECTION_END) {
    state_ = END_RCVD;
    newfile_timer_.cancel();
    newfile_timer_.resched(.0);
  }
}
//scheduled only when the tcp connection(s) are upcalling
// ask for another file after a delay to allow connection to close
// 6/8/00 shouldn't need the delay. Consider reducing or removing -kmn
scheduled only when the tcp connection(s) are upcalling
ask for another file after a delay to allow connection to close
6/8/00 shouldn't need the delay. Consider reducing or removing -kmn
scheduled only when the tcp connection ( s ) are upcalling ask for another file after a delay to allow connection to close 6 / 8 / 00 shouldn ' t need the delay . Consider reducing or removing - kmn
void FtpClientAgent::recv(Packet*, BayFullTcpAgent*, int code)
{
  if(running_ && code == DATA_PUSH) {
  state_ = DATA_RCVD;
  newfile_timer_.resched(5.0);
  }
  else if(running_ && code == CONNECTION_END) {
    state_ = END_RCVD;
    newfile_timer_.cancel();
    newfile_timer_.resched(.0);
  }
}
void FtpClientAgent :: recv ( Packet * , BayFullTcpAgent * , int code ) { if ( running_ && code == DATA_PUSH ) { state_ = DATA_RCVD ; newfile_timer_ . resched ( 5.0 ) ; } else if ( running_ && code == CONNECTION_END ) { state_ = END_RCVD ; newfile_timer_ . cancel ( ) ; newfile_timer_ . resched ( .0 ) ; } }
scheduled only when the tcp connection(s) are upcalling
ask for another file after a delay to allow connection to close
6/8/00 shouldn't need the delay.
scheduled only when the tcp connection ( s ) are upcalling ask for another file after a delay to allow connection to close 6 / 8 / 00 shouldn ' t need the delay .
//at data complete time, schedule a "far out" event to ensure // simulator doesn't terminate