Mercurial > hg > Applications > TreeVNC
changeset 547:6b6e022e48d4
merge
author | e165729 <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 16 Dec 2019 15:49:56 +0900 |
parents | 54dacb011114 (current diff) 1ba61b57be39 (diff) |
children | 673f0e672a02 |
files | .idea/libraries/Gradle__com_jcraft_jsch_0_1_50.xml |
diffstat | 4 files changed, 35 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/.idea/libraries/Gradle__com_jcraft_jsch_0_1_50.xml Mon Dec 16 15:48:40 2019 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,9 +0,0 @@ -<component name="libraryTable"> - <library name="Gradle: com.jcraft:jsch:0.1.50"> - <CLASSES> - <root url="jar://$PROJECT_DIR$/src/libs/jsch-0.1.50.jar!/" /> - </CLASSES> - <JAVADOC /> - <SOURCES /> - </library> -</component> \ No newline at end of file
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Mon Dec 16 15:48:40 2019 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEDecoder.java Mon Dec 16 15:49:56 2019 +0900 @@ -27,6 +27,7 @@ import com.glavsoft.drawing.Renderer; import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.encoding.EncodingType; +import com.glavsoft.rfb.protocol.ReceiverTask; import com.glavsoft.transport.Reader; import jp.ac.u_ryukyu.treevnc.CheckDelay; import jp.ac.u_ryukyu.treevnc.TreeRFBProto; @@ -122,13 +123,13 @@ * Series of tiles compose at most three rectangles. SYNC_FLUSH is necessary on * rectangle boundaries. * <p> - * +----+ - * | | | phase 0 - * +---------------+ - * | | | phase 1 - * +----+----------+ - * | | | phase 2 - * +----+ + * +----+ + * | | phase 0 + * +---------------+ + * | | phase 1 + * +----+----------+ + * | | phase 2 + * +----+ * <p> * Broadcast packet have to less than 64kbytes * A tile 64x64x3 11288byte, a packet can contain 5 raw tiles, when these are @@ -261,6 +262,7 @@ LinkedList<ByteBuffer> bufs = new LinkedList<ByteBuffer>(); bufs.add(c1); + ReceiverTask.checkFrameBufferRectanble(c1); if (rfb.isTreeManager() && rfb.connectionPresenter.isUseMulticast()) { for (ByteBuffer buf : bufs) rfb.getViewer().getRfbBroadcastListener().multicastUpdateRectangle(buf);
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Mon Dec 16 15:48:40 2019 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Mon Dec 16 15:49:56 2019 +0900 @@ -41,9 +41,8 @@ import jp.ac.u_ryukyu.treevnc.CheckDelayReply; import jp.ac.u_ryukyu.treevnc.TreeRFBProto; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; +import java.io.*; +import java.nio.ByteBuffer; import java.util.LinkedList; import java.util.Timer; import java.util.logging.Logger; @@ -106,6 +105,8 @@ } } + + @Override public void run() { isRunning = true; @@ -372,6 +373,19 @@ sendFrameBufferUpdateRequest(); } + public static void checkFrameBufferRectanble(ByteBuffer c1) { + FramebufferUpdateRectangle rect = new FramebufferUpdateRectangle(); + Reader in = new Reader(new ByteArrayInputStream(c1.array())); + try { + if (in.readByte() != FRAMEBUFFER_UPDATE) { + ; + } + rect.fill(in); + } catch (Exception e) { + ; + } + } + private void setScreenParameter(FramebufferUpdateRectangle rect,int singleWidth ,int singleHeight) { ViewerInterface v = rfb.getViewer(); ConnectionPresenter cp = v.getConnectionPresenter();
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Mon Dec 16 15:48:40 2019 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingRfbConnectionWorker.java Mon Dec 16 15:49:56 2019 +0900 @@ -26,7 +26,9 @@ import com.glavsoft.exceptions.*; import com.glavsoft.rfb.IPasswordRetriever; +import com.glavsoft.rfb.IRepaintController; import com.glavsoft.rfb.IRfbSessionListener; +import com.glavsoft.rfb.protocol.NullRepaintController; import com.glavsoft.rfb.protocol.Protocol; import com.glavsoft.rfb.protocol.ProtocolSettings; import com.glavsoft.transport.Reader; @@ -171,9 +173,14 @@ clipboardController = new ClipboardControllerImpl(workingProtocol, "cui"); clipboardController.setEnabled(rfbSettings.isAllowClipboardTransfer()); rfbSettings.addListener(clipboardController); - if(!myRfb.getCuiVersion()) + IRepaintController rc; + if(!myRfb.getCuiVersion()) { viewerWindow = viewerWindowFactory.createViewerWindow(workingProtocol, rfbSettings, uiSettings, connectionString, presenter); - workingProtocol.startNormalHandling(this,viewerWindow.getSurface(), clipboardController, myRfb); + rc = viewerWindow.getSurface(); + } else { + rc = new NullRepaintController(); + } + workingProtocol.startNormalHandling(this,rc, clipboardController, myRfb); // try { // workingSocket.setSoTimeout(1000); // } catch (SocketException e) {