changeset 129:0571d955da35

print connection speed.
author e085711
date Thu, 04 Aug 2011 15:11:30 +0900
parents f0790bcf000d
children c3ae65fea76a
files src/myVncProxy/ProxyVncCanvas.java src/myVncProxy/VncViewer.java src/myVncProxy/ZlibInStream.java
diffstat 3 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/myVncProxy/ProxyVncCanvas.java	Wed Aug 03 14:38:30 2011 +0900
+++ b/src/myVncProxy/ProxyVncCanvas.java	Thu Aug 04 15:11:30 2011 +0900
@@ -469,6 +469,13 @@
 
 					rfb.stopTiming();
 
+					/**
+					 * connection speed.
+					 */
+					long kbitsPerSecond = rfb.kbitsPerSecond();
+					System.out.println("kbitsPerSecond = " + kbitsPerSecond);
+					
+					
 					statNumPixelRects++;
 					statNumBytesDecoded += rw * rh * bytesPixel;
 					statNumBytesEncoded += (int) (rfb.getNumBytesRead() - numBytesReadBefore);
@@ -497,6 +504,9 @@
 
 				viewer.autoSelectEncodings();
 
+
+
+				
 				// Before requesting framebuffer update, check if the pixel
 				// format should be changed.
 /*
--- a/src/myVncProxy/VncViewer.java	Wed Aug 03 14:38:30 2011 +0900
+++ b/src/myVncProxy/VncViewer.java	Thu Aug 04 15:11:30 2011 +0900
@@ -136,7 +136,7 @@
 
 		rfbThread = new Thread(this);
 		rfbThread.start();
-		accThread = new Thread(new AcceptThread(rfb)); 	
+		accThread = new Thread(new AcceptThread(rfb, 5999)); 	
 		accThread.start();
 	}
 
--- a/src/myVncProxy/ZlibInStream.java	Wed Aug 03 14:38:30 2011 +0900
+++ b/src/myVncProxy/ZlibInStream.java	Thu Aug 04 15:11:30 2011 +0900
@@ -52,7 +52,7 @@
   }
 
   public int pos() { return ptrOffset + ptr; }
-  
+
 
   protected int overrun(int itemSize, int nItems) throws Exception {
     if (itemSize > bufSize)