ns-allinone-2.35/tcp/tfrc.cc
void TfrcAgent::sendmsg(int nbytes, const char* /*flags*/)
{
        if (nbytes == -1 && maxseq_ < MAXSEQ)
		advanceby(MAXSEQ - maxseq_);
        else if (size_ > 0) {
		int npkts = int(nbytes/size_);
		npkts += (nbytes%size_ ? 1 : 0);
		// maxqueue was added by Tom Phelan, to control the
		//   transmit queue from the application.
		if ((maxseq_ - seqno_) < maxqueue_) {
			advanceby(npkts);
		}
	}
}
/*
 * Must convert bytes into packets. 
 * If nbytes == -1, this corresponds to infinite send.  We approximate
 * infinite by a very large number (MAXSEQ).
 * For simplicity, when bytes are converted to packets, fractional packets 
 * are always rounded up.  
 */
Must convert bytes into packets.
If nbytes == -1, this corresponds to infinite send.  We approximate
infinite by a very large number (MAXSEQ).
For simplicity, when bytes are converted to packets, fractional packets
are always rounded up.
Must convert bytes into packets . If nbytes == - 1 this corresponds to infinite send . We approximate infinite by a very large number ( MAXSEQ ) . For simplicity when bytes are converted to packets fractional packets are always rounded up .
void TfrcAgent::sendmsg(int nbytes, const char* )
{
        if (nbytes == -1 && maxseq_ < MAXSEQ)
		advanceby(MAXSEQ - maxseq_);
        else if (size_ > 0) {
		int npkts = int(nbytes/size_);
		npkts += (nbytes%size_ ? 1 : 0);
		if ((maxseq_ - seqno_) < maxqueue_) {
			advanceby(npkts);
		}
	}
}
void TfrcAgent :: sendmsg ( int nbytes , const char * ) { if ( nbytes == -1 && maxseq_ < MAXSEQ ) advanceby ( MAXSEQ - maxseq_ ) ; else if ( size_ > 0 ) { int npkts = int ( nbytes / size_ ) ; npkts += ( nbytes % size_ ? 1 : 0 ) ; if ( ( maxseq_ - seqno_ ) < maxqueue_ ) { advanceby ( npkts ) ; } } }
Must convert bytes into packets.
Must convert bytes into packets .
/*flags*/ // maxqueue was added by Tom Phelan, to control the //   transmit queue from the application.