Mercurial > hg > Applications > TreeVNC
diff src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java @ 234:8479ad028ec7
fix checkdelay send and get.
author | oc |
---|---|
date | Sat, 11 Oct 2014 02:47:17 +0900 |
parents | 26b7c0a6d91b |
children | 0815ed7f54a7 |
line wrap: on
line diff
--- a/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Fri Oct 10 23:43:06 2014 +0900 +++ b/src/main/java/com/glavsoft/rfb/protocol/ReceiverTask.java Sat Oct 11 02:47:17 2014 +0900 @@ -129,14 +129,6 @@ logger.fine("Server message: CutText (3)"); serverCutText(); break; - case CHECK_DELAY: - ZRLEESender sender = new ZRLEESender(rfb); - sender.readCheckDelay(reader); - /* - reader.readBytes(15); - System.out.println("delay_time="+(System.currentTimeMillis() - reader.readInt64())); - */ - break; default: logger.severe("Unsupported server message. Id = " + messageId); } @@ -263,13 +255,13 @@ context.sendMessage(new FramebufferUpdateRequestMessage(0, 0, rect.width, rect.height, false)); // repaintController.repaintCursor(); } else if (rect.getEncodingType() == EncodingType.CHECK_DELAY) { - readCheckDelay(reader); int length = reader.readInt32(); reader.reset(); + rfb.readSendData(length + 24, reader, null); - rfb.readSendData(length + 52, reader, null); - // System.out.println("rect.time=" + rect.time); - sendCheckDelayReply(rect.time); + int port = rfb.acceptPort; + String address = rfb.getMyAddress(); + sendCheckDelayReply(rect.time, port, address); } else throw new CommonException("Unprocessed encoding: " + rect.toString()); } @@ -290,8 +282,8 @@ } } - private void sendCheckDelayReply(long time) { - context.sendMessage(new CheckDelayReply(time)); + private void sendCheckDelayReply(long time, int port, String address) throws UnsupportedEncodingException { + context.sendMessage(new CheckDelayReply(time, port, address)); }