Mercurial > hg > Members > nobuyasu > tightVNCProxy
changeset 154:6606b71b64a6
modify RFB Protocol Version. From 3.998 to 3.855
author | e085711 |
---|---|
date | Tue, 20 Sep 2011 05:56:24 +0900 |
parents | 4fca6f516880 |
children | 0510022e9e92 |
files | src/myVncProxy/MyRfbProto.java |
diffstat | 1 files changed, 7 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/myVncProxy/MyRfbProto.java Mon Sep 19 04:56:21 2011 +0900 +++ b/src/myVncProxy/MyRfbProto.java Tue Sep 20 05:56:24 2011 +0900 @@ -34,9 +34,9 @@ public class MyRfbProto extends RfbProto { - final static String versionMsg_3_998 = "RFB 003.998\n"; + final static String versionMsg_3_855 = "RFB 003.855\n"; /** - * CheckMillis is one of new msgType for RFB 3.998. + * CheckMillis is one of new msgType for RFB 3.855. */ final static byte SpeedCheckMillis = 4; private static final int INFLATE_BUFSIZE = 1024*100; @@ -91,15 +91,12 @@ // over write void writeVersionMsg() throws IOException { clientMajor = 3; - if (serverMinor >= 9) { - clientMinor = 9; - os.write(versionMsg_3_998.getBytes()); + if (serverMinor == 855) { + clientMinor = 855; + os.write(versionMsg_3_855.getBytes()); } else if (serverMajor > 3 || serverMinor >= 8) { clientMinor = 8; os.write(versionMsg_3_8.getBytes()); - } else if (serverMinor >= 9) { - clientMinor = 9; - os.write(versionMsg_3_998.getBytes()); } else if (serverMinor >= 7) { clientMinor = 7; os.write(versionMsg_3_7.getBytes()); @@ -208,8 +205,8 @@ } void sendRfbVersion(OutputStream os) throws IOException { - os.write(versionMsg_3_998.getBytes()); // os.write(versionMsg_3_8.getBytes()); + os.write(versionMsg_3_855.getBytes()); } void readVersionMsg(InputStream is, OutputStream os) throws IOException { @@ -235,7 +232,7 @@ "RFB server does not support protocol version 3"); } - if (serverMinor == 998) { + if (serverMinor == 855) { sendPortNumber(os); }