Mercurial > hg > Applications > TreeVNC
view src/main/java/jp/ac/u_ryukyu/treevnc/RequestSingleDisplayWidth.java @ 301:ae7deb002b5f
send and receive single display size
author | oc |
---|---|
date | Sun, 18 Jan 2015 08:36:06 +0900 |
parents | 9c5874d0f37e |
children |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.client.ClientToServerMessage; import com.glavsoft.transport.Writer; import java.nio.ByteBuffer; import java.nio.ByteOrder; /** * Created by OcBookPro on 15/01/10. */ public class RequestSingleDisplayWidth implements ClientToServerMessage { private short id; public RequestSingleDisplayWidth() { } @Override public void send(Writer writer) throws TransportException { ByteBuffer out = ByteBuffer.allocate(2); out.order(ByteOrder.BIG_ENDIAN); out.put(REQUEST_SINGLE_DISPLAY_SIZE); out.put((byte)0); // padding writer.write(out.array(), 0, out.position()); writer.flush(); } }