Mercurial > hg > Applications > TreeVNC
view src/main/java/jp/ac/u_ryukyu/treevnc/SendCheckDelay.java @ 275:0f9b3de45fb2
set main display size.
author | oc |
---|---|
date | Tue, 06 Jan 2015 19:07:27 +0900 |
parents | a931be447973 |
children | 16d3584ae7a0 |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import java.io.UnsupportedEncodingException; import java.nio.ByteBuffer; import java.util.LinkedList; import com.glavsoft.rfb.encoding.EncodingType; public class SendCheckDelay implements Runnable { private TreeRFBProto rfb; public SendCheckDelay(TreeRFBProto rfb) { this.rfb = rfb; } public void sendCheckDelay() throws UnsupportedEncodingException { LinkedList<ByteBuffer> checkdelay = new LinkedList<ByteBuffer>(); long time = System.currentTimeMillis(); checkdelay.add(new CheckDelay(0, 0, 0, 0, time, EncodingType.CHECK_DELAY).getMessage()); rfb.addSerialNumber(checkdelay); rfb.multicastqueue.put(checkdelay); System.out.println(time + " : send checkDelay"); } public void run() { for (;;) { long sendTime = 5000; // send check delay timing (5 sec) try { synchronized (this) { wait(sendTime); sendCheckDelay(); } } catch (InterruptedException e) { e.printStackTrace(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } } }