Mercurial > hg > Applications > TreeVNC
view src/main/java/jp/ac/u_ryukyu/treevnc/CheckDelayReply.java @ 232:6ee4cdca104c
send value of port and localhost in checkdelay framebufferupdate, and get this.
author | oc |
---|---|
date | Fri, 10 Oct 2014 23:39:44 +0900 |
parents | f4ea9ff04741 |
children | 8479ad028ec7 |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import java.nio.ByteBuffer; import java.nio.ByteOrder; import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.client.ClientToServerMessage; import com.glavsoft.transport.Writer; public class CheckDelayReply implements ClientToServerMessage { private long time; public CheckDelayReply(long time) { this.time = time; } @Override public void send(Writer writer) throws TransportException { ByteBuffer out = ByteBuffer.allocate(10); out.order(ByteOrder.BIG_ENDIAN); out.put(CHECK_DELAY_REPLY); out.put((byte)0); out.putLong(time); writer.write(out.array(), 0, out.position()); writer.flush(); } }