Mercurial > hg > Members > nobuyasu > tightVNCClient
changeset 77:42b08ecc4cb5
modify reConnectAndAuthenticate
author | e085711 |
---|---|
date | Tue, 30 Aug 2011 17:49:42 +0900 |
parents | 70004fedb1d1 |
children | fe94e353d595 |
files | src/myVncClient/MyVncClient.java |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/myVncClient/MyVncClient.java Tue Aug 30 17:36:40 2011 +0900 +++ b/src/myVncClient/MyVncClient.java Tue Aug 30 17:49:42 2011 +0900 @@ -442,6 +442,24 @@ showConnectionStatus("Using RFB protocol version " + rfb.clientMajor + "." + rfb.clientMinor); + + if(rfb.serverMinor == 998) { + byte[] b = new byte[4]; + b = rfb.readEchoPort(); + int echoPort = castByteInt(b); + + InetAddress addr = InetAddress.getByName(host); + String h = new String(addr.getHostAddress()); + + getParentname(echo, echoPort); + if(!(h.equals(host))) { + rfb.changeParent(host, port); + rfb.readVersionMsg(); + rfb.writeVersionMsg(); + } + } + + int secType = rfb.negotiateSecurity(); int authType; if (secType == RfbProto.SecTypeTight) {