Mercurial > hg > Applications > TreeVNC
annotate src/main/java/jp/ac/u_ryukyu/treevnc/CheckDelay.java @ 331:42fcc9419498
add error message, add lostParent case by fail to connectTo.
author | oc |
---|---|
date | Tue, 03 Feb 2015 12:31:48 +0900 |
parents | 49762c621bd6 |
children | b9e73589202c |
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) { |
236 | 14 |
15 msg = ByteBuffer.allocate(24).order(ByteOrder.BIG_ENDIAN); | |
16 msg.put((byte) 0); // FrameBufferUpdate | |
17 msg.put((byte) 0); // padding | |
18 msg.putShort((short) 1); // number of rectangle | |
19 msg.putShort((short) i); | |
20 msg.putShort((short) j); | |
21 msg.putShort((short) width); | |
22 msg.putShort((short) height); | |
23 msg.putInt(checkDelay.getId()); | |
24 msg.putLong(time); | |
25 msg.flip(); | |
26 | |
27 } | |
28 | |
29 public ByteBuffer getMessage(){ | |
30 return msg; | |
31 } | |
32 | |
33 } |