Mercurial > hg > Members > riono > TreeVNC_ja_comment
changeset 68:e6550afe663b
delete video feedback.
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/encoding/decoder/ZRLEESender.java Mon Mar 10 22:41:30 2014 +0900 @@ -27,7 +27,7 @@ rfb.readSendData(dataLen, reader); if (rfb instanceof MyRfbProtoClient) { - //reader.readBytes(8); + reader.readBytes(8); reader.readByte();// message reader.readByte();// padding reader.readUInt16();// numberOfRectangle
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Mon Mar 10 22:41:30 2014 +0900 @@ -69,7 +69,6 @@ protected PixelFormat pixelFormat; protected boolean needSendPixelFormat; private MyRfbProto rfb; - private boolean cuiVersion; private long checkCounter = 0; public ReceiverTask(Reader reader, @@ -111,12 +110,12 @@ isRunning = true; while (isRunning) { try { -// if(rfb instanceof MyRfbProtoClient) { -// reader.mark(28); -// getLost(reader); -// } else { + if(rfb instanceof MyRfbProtoClient) { + reader.mark(28); + getLost(reader); + } else { reader.mark(20); -// } + } byte messageId = reader.readByte(); switch (messageId) { case FRAMEBUFFER_UPDATE:
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/MyRfbProto.java Mon Mar 10 22:41:30 2014 +0900 @@ -235,7 +235,6 @@ os.writeBytes(echo.getMyAddress()+"\n"); //os.writeBytes(String.valueOf(echo.client.getFrameWidth())+"\n"); temp comment out for rebuild //os.writeBytes(String.valueOf(echo.client.getFrameHeight())+"\n"); temp comment out for rebuild - System.out.println("---------push-------"+proxyAddr); os.close(); }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/GetHostClient.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/GetHostClient.java Mon Mar 10 22:41:30 2014 +0900 @@ -30,8 +30,7 @@ public void sendData() { buf = str.getBytes(); - DatagramPacket sendPacket = new DatagramPacket(buf, str.length(), - mAddr, PORT); + DatagramPacket sendPacket = new DatagramPacket(buf, str.length(), mAddr, PORT); try { soc.send(sendPacket); } catch (IOException e) {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java Mon Mar 10 22:41:30 2014 +0900 @@ -309,10 +309,10 @@ throws TransportException { LinkedList<ByteBuffer> bufs = new LinkedList<ByteBuffer>(); ByteBuffer header = ByteBuffer.allocate(16); -// ByteBuffer serial = ByteBuffer.allocate(8); - reader.mark(dataLen); // +8 is serialnum -// reader.readBytes(serial.array(),0,8); -// serial.limit(8); + ByteBuffer serial = ByteBuffer.allocate(8); + reader.mark(dataLen+8); // +8 is serialnum + reader.readBytes(serial.array(),0,8); + serial.limit(8); reader.readBytes(header.array(), 0, 16); header.limit(16); if (header.get(0) == FramebufferUpdate) { @@ -357,7 +357,7 @@ return; } } -// bufs.add(serial); + bufs.add(serial); bufs.add(header); if (dataLen > 16) { ByteBuffer b = ByteBuffer.allocate(dataLen - 16);
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/WaitReply.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/WaitReply.java Mon Mar 10 22:41:30 2014 +0900 @@ -35,7 +35,6 @@ //echo.client.closeApp(); passflag = true; echo.client.closeApp(); - System.out.println("8888888888888888888888waitreply"); echo.client.setSocket(echo.createSocketForClient(clientSocket,true)); echo.client.run(); echoServer.close();
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/GetBroadCastProxy.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/GetBroadCastProxy.java Mon Mar 10 22:41:30 2014 +0900 @@ -19,6 +19,7 @@ private VncProxyService vps; private BroadCastProxy bCast; private String address; + private String str = "who"; public GetBroadCastProxy(VncProxyService _vps,String desktopName,String host){ vps = _vps; @@ -39,7 +40,7 @@ address = getAddress(recvPacket.getSocketAddress()); inputStream = new ByteArrayInputStream(recvPacket.getData()); inputStream.read(resorve); - if("who".equals(castString(resorve))){ + if(str.equals(castString(resorve))){ replyBroadCast(); } if(stopFlag) break;
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java Mon Mar 10 22:41:30 2014 +0900 @@ -315,12 +315,12 @@ bufs.addFirst(blen); bufs.addFirst(header); - /* + ByteBuffer serialNum = ByteBuffer.allocate(8); serialNum.putLong(counter++); serialNum.flip(); bufs.addFirst(serialNum); - */ + /* if(i++%50 == 0) { LinkedList<ByteBuffer> check = new LinkedList<ByteBuffer>();
--- a/src/viewer_swing/java/com/glavsoft/viewer/CuiViewer.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/CuiViewer.java Mon Mar 10 22:41:30 2014 +0900 @@ -266,4 +266,8 @@ public boolean getCuiVersion() { return cuiVersion; } + + public void setCuiVersion(boolean flag) { + // nop + } }
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Mon Mar 10 22:41:30 2014 +0900 @@ -335,6 +335,9 @@ public boolean getCuiVersion() { return cuiVersion; } + public void setCuiVersion(boolean flag) { + cuiVersion = flag; + } }
--- a/src/viewer_swing/java/com/glavsoft/viewer/ViewerImpl.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/ViewerImpl.java Mon Mar 10 22:41:30 2014 +0900 @@ -23,4 +23,5 @@ public void setTeminationType(boolean b); + public void setCuiVersion(boolean flag); }
--- a/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Sat Feb 01 07:48:16 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/swing/SwingViewerWindow.java Mon Mar 10 22:41:30 2014 +0900 @@ -171,9 +171,10 @@ // frame.pack(); outerPanel.setSize(surface.getPreferredSize()); internalPack(null); - if(viewer.getRfb() instanceof MyRfbProtoProxy || viewer.getCuiVersion()) + if(viewer.getRfb() instanceof MyRfbProtoProxy || viewer.getCuiVersion()) { frame.setVisible(false); - else + viewer.setCuiVersion(false); + } else frame.setVisible(true); //frame.setVisible(false); frame.validate(); @@ -815,6 +816,7 @@ @Override public void actionPerformed(ActionEvent e) { try { + viewer.setCuiVersion(true); viewer.getRfb().screenChangeRequest(); } catch (IOException e1) { e1.printStackTrace();