Mercurial > hg > Applications > TightVNC_orginal
changeset 20:98519d16a8c3
getInitData from ProtocolContext
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 29 Aug 2012 23:22:14 +0900 |
parents | ea83f4be0cc9 |
children | bfddb801c3aa |
files | Todo.txt src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java |
diffstat | 4 files changed, 19 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Todo.txt Wed Aug 29 23:22:14 2012 +0900 @@ -0,0 +1,7 @@ +Wed Aug 29 22:27:25 JST 2012 + + MyRfbProxy の os が初期化されていない (削除する方が良い) + + initData が null ( 設定された時に、設定するべき) + +
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java Wed Aug 29 21:28:18 2012 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/client/MyRfbProtoClient.java Wed Aug 29 23:22:14 2012 +0900 @@ -19,6 +19,7 @@ import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.encoding.EncodingType; +import com.glavsoft.rfb.protocol.ProtocolContext; import com.glavsoft.transport.Reader; import com.glavsoft.viewer.ContainerManager; import com.glavsoft.viewer.swing.ParametersHandler.ConnectionParams; @@ -37,7 +38,7 @@ OutputStream os; private ContainerManager containerManager; private ServerSocket servSock; - private byte initData[]; + private ProtocolContext context; private int clients = 0; private MulticastQueue<LinkedList<ByteBuffer>> multicastqueue = new MulticastQueue<LinkedList<ByteBuffer>>(); boolean proxyFlag = false; @@ -354,7 +355,7 @@ } void sendInitData(OutputStream os) throws IOException { - os.write(initData); + os.write(context.getInitData()); } void sendProxyFlag(OutputStream os) throws IOException {
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java Wed Aug 29 21:28:18 2012 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/MyRfbProtoProxy.java Wed Aug 29 23:22:14 2012 +0900 @@ -16,6 +16,8 @@ import com.glavsoft.exceptions.CommonException; import com.glavsoft.exceptions.TransportException; import com.glavsoft.rfb.encoding.EncodingType; +import com.glavsoft.rfb.protocol.Protocol; +import com.glavsoft.rfb.protocol.ProtocolContext; import com.glavsoft.transport.Reader; import com.glavsoft.transport.Writer; @@ -53,7 +55,7 @@ private ServerSocket servSock; protected int acceptPort; // private byte initData[]; - byte initData[]; + ProtocolContext context; private LinkedList<Socket> cliListTmp; private LinkedList<Socket> cliList; boolean createBimgFlag; @@ -755,7 +757,7 @@ } void sendInitData(Writer os) throws TransportException { - os.write(initData); + os.write(context.getInitData()); } public void writeFramebufferUpdateRequest(int x, int y, int w, int h, @@ -775,8 +777,9 @@ os.write(b); } + + public void setProtocolContext(Protocol workingProtocol) { + context = workingProtocol; + } - public void setInitData(byte[] _initData) { - initData = _initData; - } }
--- a/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Wed Aug 29 21:28:18 2012 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java Wed Aug 29 23:22:14 2012 +0900 @@ -154,7 +154,7 @@ */ workingProtocol.startNormalHandling(this, surface, clipboardController,rfb); - rfb.setInitData(workingProtocol.getInitData()); + // rfb.setInitData(workingProtocol.getInitData()); too early // workingProtocol.startNormalHandling(this, surface, clipboardController); tryAgain = false; } catch (UnsupportedProtocolVersionException e) {