Mercurial > hg > Members > nobuyasu > tightVNCProxy
changeset 153:4fca6f516880
modify MyRfbProto.newCli
author | e085711 |
---|---|
date | Mon, 19 Sep 2011 04:56:21 +0900 |
parents | db5f735fd2b4 |
children | 6606b71b64a6 |
files | src/myVncProxy/MyRfbProto.java src/myVncProxy/ProxyVncCanvas.java |
diffstat | 2 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/myVncProxy/MyRfbProto.java Sat Sep 10 04:13:50 2011 +0900 +++ b/src/myVncProxy/MyRfbProto.java Mon Sep 19 04:56:21 2011 +0900 @@ -116,7 +116,9 @@ acceptPort = port; } - // 5999を開けるが、開いてないなら+1のポートを開ける。 + /* + * default port number is 5999. + */ void selectPort(int p) { if(servSock != null ) return ; int port = p; @@ -367,9 +369,9 @@ void sendDataToClient() throws Exception { regiFramebufferUpdate(); - printFramebufferUpdate(); +// printFramebufferUpdate(); int dataLen = checkAndMark(); - readSendData(dataLen); + readSendData(dataLen); } BufferedImage createBufferedImage(Image img) { @@ -736,6 +738,7 @@ readClientInit(is); sendInitData(os); new Thread(reader).start(); // discard incoming packet here after. + writeFramebufferUpdateRequest(0,0, framebufferWidth, framebufferHeight, false ); for (;;) { LinkedList<ByteBuffer> bufs = c.poll(); int inputIndex = 0;
--- a/src/myVncProxy/ProxyVncCanvas.java Sat Sep 10 04:13:50 2011 +0900 +++ b/src/myVncProxy/ProxyVncCanvas.java Mon Sep 19 04:56:21 2011 +0900 @@ -360,7 +360,7 @@ long count = 0; long buf = 0; while (true) { - System.out.println("\ncount=" + count); +// System.out.println("\ncount=" + count); count++; @@ -371,12 +371,12 @@ -// rfb.sendDataToClient(); + rfb.sendDataToClient(); -// long kbitsPerSecond = rfb.kbitsPerSecond(); + long kbitsPerSecond = rfb.kbitsPerSecond(); // System.out.println("Throughput " + kbitsPerSecond + " kbit/s"); -/* + if(rfb.returnMsgtype() == RfbProto.FramebufferUpdate ) { boolean fullUpdateNeeded = false; int w = rfb.framebufferWidth; @@ -384,7 +384,7 @@ rfb.writeFramebufferUpdateRequest(0, 0, w, h, !fullUpdateNeeded); continue; } -*/ + long numBytesRead = rfb.getNumBytesRead(); @@ -398,12 +398,12 @@ rfb.readSpeedCheck(); break; case RfbProto.FramebufferUpdate: -/* + if(msgType == RfbProto.FramebufferUpdate){ rfb.is.reset(); break; } -*/ + if (statNumUpdates == viewer.debugStatsExcludeUpdates && !statsRestarted) { resetStats();