Mercurial > hg > Applications > TreeVNC
view src/main/java/jp/ac/u_ryukyu/treevnc/UpdateRectangleMessage.java @ 98:8f4c45c1b396
add serial number to desktop size encoding packet.
author | oc |
---|---|
date | Thu, 22 May 2014 21:10:54 +0900 |
parents | 44f5cdc63a76 |
children | 86289e56263c |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import java.nio.ByteBuffer; import java.nio.ByteOrder; import com.glavsoft.rfb.encoding.EncodingType; public class UpdateRectangleMessage { private ByteBuffer msg = ByteBuffer.allocate(16).order(ByteOrder.BIG_ENDIAN); public UpdateRectangleMessage(int i, int j, int width, int height, EncodingType desktopSize) { msg.put((byte) 0); // FrameBufferUpdate msg.put((byte) 0); // padding msg.putShort((short) 1); // number of rectangle msg.putShort((short) i); msg.putShort((short) j); msg.putShort((short) width); msg.putShort((short) height); msg.putInt(desktopSize.getId()); msg.flip(); } public ByteBuffer getMessage(){ return msg; } }