Mercurial > hg > Members > riono > TreeVNC_ja_comment
comparison src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommandChannelListener.java @ 448:344a35b7c47f
send both frame buffer size and selected screen size in Disktop size change (INIT_DATA)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 18 Jun 2016 20:09:46 +0900 |
parents | ffe01c959cdd |
children | 141f627665ab |
comparison
equal
deleted
inserted
replaced
447:3996fde6f8ed | 448:344a35b7c47f |
---|---|
1 package jp.ac.u_ryukyu.treevnc; | 1 package jp.ac.u_ryukyu.treevnc; |
2 import com.glavsoft.exceptions.TransportException; | |
3 import com.glavsoft.rfb.protocol.ProtocolContext; | |
4 import com.glavsoft.rfb.protocol.ProtocolContext.TreeCommand; | |
5 import com.glavsoft.rfb.protocol.state.HandshakeState; | |
6 import com.glavsoft.transport.Reader; | |
7 import com.glavsoft.transport.Writer; | |
8 | |
9 import java.io.IOException; | |
10 import java.io.InputStream; | |
11 import java.io.OutputStream; | |
2 import java.io.UnsupportedEncodingException; | 12 import java.io.UnsupportedEncodingException; |
3 import java.net.InetAddress; | 13 import java.net.InetAddress; |
4 import java.net.NetworkInterface; | 14 import java.net.NetworkInterface; |
5 import java.net.Socket; | 15 import java.net.Socket; |
6 import java.nio.ByteBuffer; | 16 import java.nio.ByteBuffer; |
7 import java.nio.ByteOrder; | 17 import java.nio.ByteOrder; |
8 import java.util.concurrent.LinkedBlockingQueue; | 18 import java.util.concurrent.LinkedBlockingQueue; |
9 import java.util.concurrent.TimeUnit; | 19 import java.util.concurrent.TimeUnit; |
10 import java.io.IOException; | |
11 import java.io.InputStream; | |
12 import java.io.OutputStream; | |
13 | |
14 import com.glavsoft.exceptions.TransportException; | |
15 import com.glavsoft.rfb.protocol.ProtocolContext; | |
16 import com.glavsoft.rfb.protocol.ProtocolContext.TreeCommand; | |
17 import com.glavsoft.rfb.protocol.state.HandshakeState; | |
18 import com.glavsoft.transport.Reader; | |
19 import com.glavsoft.transport.Writer; | |
20 | 20 |
21 | 21 |
22 public class TreeVncCommandChannelListener implements Runnable { | 22 public class TreeVncCommandChannelListener implements Runnable { |
23 public TreeRFBProto rfb = null; | 23 public TreeRFBProto rfb = null; |
24 byte[] imageBytes; | 24 byte[] imageBytes; |
226 } | 226 } |
227 | 227 |
228 void sendInitData(Writer os) throws TransportException { | 228 void sendInitData(Writer os) throws TransportException { |
229 ProtocolContext context = rfb.context; | 229 ProtocolContext context = rfb.context; |
230 if (context != null) { | 230 if (context != null) { |
231 if (rfb.filterSingleDisplay) { | 231 os.write(context.getInitData()); |
232 int width = rfb.getSingleWidth(); | |
233 int height = rfb.getSingleHeight(); | |
234 byte[] initData = createOriginalInitData(width, height, context.getRemoteDesktopName()); | |
235 // os.write(initData); | |
236 os.write(context.getInitData()); | |
237 } else { | |
238 os.write(context.getInitData()); | |
239 } | |
240 } else { | 232 } else { |
241 // In case of "-d" we have no context | 233 // In case of "-d" we have no context |
242 // Send dummy data | 234 // Send dummy data |
243 // width : 1920 | 235 // width : 1920 |
244 // height : 1080 | 236 // height : 1080 |