[Sumover-dev] [svn commit] r4683 - vic/branches/cc/rtp

sumover-dev at cs.ucl.ac.uk sumover-dev at cs.ucl.ac.uk
Thu Mar 11 16:06:08 GMT 2010


Author: soohyunc
Date: Thu Mar 11 16:06:08 2010
New Revision: 4683

Modified:
   vic/branches/cc/rtp/transmitter.cpp
   vic/branches/cc/rtp/transmitter.h

Log:
(Tx buffer size)
-- added a method to return the current transmission packet buffer size



Modified: vic/branches/cc/rtp/transmitter.cpp
==============================================================================
--- vic/branches/cc/rtp/transmitter.cpp	(original)
+++ vic/branches/cc/rtp/transmitter.cpp	Thu Mar 11 16:06:08 2010
@@ -215,6 +215,19 @@
 	return (8 * cc / (1000. * kbps_));
 }
 
+/*
+ * Tx pktbuf size
+ */
+int Transmitter::tx_buf_size() {
+	int size = 0;
+	pktbuf* pb = head_;
+	while (pb) {
+		size++;
+		pb = pb->next;
+	}	
+	return size;
+}
+
 void Transmitter::send(pktbuf* pb)
 {
 	switch (cc_type_) {

Modified: vic/branches/cc/rtp/transmitter.h
==============================================================================
--- vic/branches/cc/rtp/transmitter.h	(original)
+++ vic/branches/cc/rtp/transmitter.h	Thu Mar 11 16:06:08 2010
@@ -108,6 +108,9 @@
 	}
 	double tx_now_offset_;
 
+	// Tx pktbuf size
+	int tx_buf_size();
+
 protected:
 	void update(int nbytes);
 	void dump(int fd, iovec*, int iovel) const;



More information about the Sumover-dev mailing list