Mercurial > hg > Members > you > BroadCastTreeVNC
diff src/treeVnc/RfbProto.java @ 2:5d72f4c7371d
befor change
author | Yu Taninari <you@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 07 Apr 2012 14:55:34 +0900 |
parents | 1d5cebe3bca0 |
children | 3b341997141a |
line wrap: on
line diff
--- a/src/treeVnc/RfbProto.java Thu Feb 23 16:18:42 2012 +0900 +++ b/src/treeVnc/RfbProto.java Sat Apr 07 14:55:34 2012 +0900 @@ -28,9 +28,11 @@ import java.io.*; import java.awt.event.*; import java.net.Socket; +import java.nio.ByteBuffer; +import java.util.LinkedList; import java.util.zip.*; -class RfbProto { +public class RfbProto { final static String versionMsg_3_3 = "RFB 003.003\n", versionMsg_3_7 = "RFB 003.007\n", versionMsg_3_8 = "RFB 003.008\n",versionMsg_3_855 = "RFB 003.855\n"; @@ -1368,14 +1370,30 @@ readFully(b, 0, b.length); } - long before = System.currentTimeMillis(); + long before = System.currentTimeMillis(); public void readFully(byte b[], int off, int len) throws IOException { - long before = 0; +// long before = 0; if (timing) before = System.currentTimeMillis(); is.readFully(b, off, len); + + /* + if(b.length==16) { + b[4] = (byte)0; + b[5] = (byte)0; + b[6] = (byte)0; + b[7] = (byte)0; + System.out.println("----------------------"); + } + */ + //System.out.println("Blength:"+b.length); + //for(int i=0 ; i<=b.length ; i++) { + //if(i>b.length/2) + //b[i] = 10; + //} + /* if (timing) { long after = System.currentTimeMillis(); long newTimeWaited = (after - before) * 10; @@ -1392,8 +1410,9 @@ timedKbits += newKbits; before = after; } - + */ numBytesRead += len; + //System.out.println("numBytesRead:"+numBytesRead); } final int available() throws IOException { @@ -1426,4 +1445,9 @@ numBytesRead += 4; return r; } + + public LinkedList<ByteBuffer> blockingUpdateRectangle(ByteBuffer input,int w,int h) { + + return null; + } }