Mercurial > hg > Applications > TreeVNC
annotate src/main/java/jp/ac/u_ryukyu/treevnc/CheckDelay.java @ 630:7071b01621c2 default tip
Determine ipv4 or ipv6 and fix scond display
author | riono <e165729@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 28 Apr 2020 19:49:38 +0900 |
parents | b9e73589202c |
children |
rev | line source |
---|---|
236 | 1 package jp.ac.u_ryukyu.treevnc; |
2 | |
3 import java.io.UnsupportedEncodingException; | |
4 import java.nio.ByteBuffer; | |
5 import java.nio.ByteOrder; | |
6 import com.glavsoft.rfb.encoding.EncodingType; | |
7 | |
8 | |
9 public class CheckDelay { | |
10 | |
11 private ByteBuffer msg; | |
12 | |
331
42fcc9419498
add error message, add lostParent case by fail to connectTo.
oc
parents:
236
diff
changeset
|
13 public CheckDelay(int i, int j, int width, int height, long time, EncodingType checkDelay) { |
502 | 14 |
236 | 15 msg = ByteBuffer.allocate(24).order(ByteOrder.BIG_ENDIAN); |
502 | 16 checkDelay(msg, (short) i, (short) j, (short) width, (short) height, time, checkDelay); |
17 msg.flip(); | |
18 | |
19 } | |
20 | |
21 public static void checkDelay(ByteBuffer msg, int i, int j, int width, int height, long time, EncodingType checkDelay) { | |
236 | 22 msg.put((byte) 0); // FrameBufferUpdate |
23 msg.put((byte) 0); // padding | |
24 msg.putShort((short) 1); // number of rectangle | |
25 msg.putShort((short) i); | |
26 msg.putShort((short) j); | |
27 msg.putShort((short) width); | |
28 msg.putShort((short) height); | |
29 msg.putInt(checkDelay.getId()); | |
30 msg.putLong(time); | |
31 } | |
502 | 32 |
236 | 33 public ByteBuffer getMessage(){ |
34 return msg; | |
35 } | |
36 | |
37 } |