Mercurial > hg > Members > nobuyasu > tightVNCProxy
changeset 77:fe5925bb9a7e
modify MyRfb.java
author | e085711 |
---|---|
date | Thu, 28 Jul 2011 18:03:26 +0900 |
parents | 347c153f74c7 |
children | 5970410efee7 |
files | bin/myVncProxy/child.class src/myVncProxy/MyRfbProto.java src/myVncProxy/ProxyVncCanvas.java |
diffstat | 3 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/myVncProxy/MyRfbProto.java Thu Jul 28 17:59:39 2011 +0900 +++ b/src/myVncProxy/MyRfbProto.java Thu Jul 28 18:03:26 2011 +0900 @@ -28,7 +28,7 @@ /** * CheckMillis is one of new msgType for RFB 3.998. */ - final static int CheckMillis = 4; + final static int SpeedCheckMillis = 4; boolean printStatusFlag = false; long startCheckTime; @@ -478,21 +478,21 @@ } } - void readCheckMillis() throws IOException { - byte[] b = new byte[2]; + void readSpeedCheck() throws IOException { + byte[] b = new byte[1]; readFully(b); } - void startCheckMillis() { + void startSpeedCheck() { byte[] b = new byte[2]; - b[0] = (byte) CheckMillis; + b[0] = (byte) SpeedCheckMillis; b[1] = (byte) 0; startCheckTime = System.currentTimeMillis(); System.out.println("startChckTime = "+ startCheckTime); multicastqueue.put(b); } - void endCheckMills() { + void endSpeedCheck() { long accTime = System.currentTimeMillis(); long time = accTime - startCheckTime; System.out.println("checkMillis: " + time); @@ -554,7 +554,7 @@ } - void sendCheckMillis() { + void speedCheckMillis() { Runnable stdin = new Runnable() { public void run() { @@ -565,7 +565,7 @@ case 's': break; default: - startCheckMillis(); + startSpeedCheck(); break; } }
--- a/src/myVncProxy/ProxyVncCanvas.java Thu Jul 28 17:59:39 2011 +0900 +++ b/src/myVncProxy/ProxyVncCanvas.java Thu Jul 28 18:03:26 2011 +0900 @@ -378,8 +378,8 @@ // Process the message depending on its type. switch (msgType) { - case MyRfbProto.CheckMillis: - rfb.readCheckMillis(); + case MyRfbProto.SpeedCheckMillis: + rfb.readSpeedCheck(); break; case RfbProto.FramebufferUpdate: