Mercurial > hg > Members > riono > TreeVNC_ja_comment
view src/main/java/jp/ac/u_ryukyu/treevnc/SoundPacketQueue.java @ 514:887ebd993b3d
separate rfb broadcast
author | mir3636 |
---|---|
date | Thu, 21 Feb 2019 16:52:21 +0900 |
parents | 3ede63861103 |
children |
line wrap: on
line source
package jp.ac.u_ryukyu.treevnc; import com.glavsoft.rfb.encoding.decoder.ByteBuffer; import java.util.concurrent.BlockingQueue; import java.util.concurrent.TimeUnit; /** * Created by OcBookPro on 15/01/15. */ public class SoundPacketQueue { private final BlockingQueue<byte[]> queue; public SoundPacketQueue(BlockingQueue<byte[]> queue) { this.queue = queue; } public void put(byte[] packet) { queue.offer(packet); } public byte[] get() throws InterruptedException { return queue.poll(1, TimeUnit.SECONDS); } }