Mercurial > hg > Members > nobuyasu > tightVNCClient
diff src/myVncClient/CuiMyVncClient.java @ 70:affdcbdc90ea
modify CreateCanva.java. implement ZRLEE.
author | e085711 |
---|---|
date | Sun, 07 Aug 2011 13:40:56 +0900 |
parents | 1f05b73b15df |
children | f6cb1edc2036 |
line wrap: on
line diff
--- a/src/myVncClient/CuiMyVncClient.java Sun Aug 07 04:22:07 2011 +0900 +++ b/src/myVncClient/CuiMyVncClient.java Sun Aug 07 13:40:56 2011 +0900 @@ -96,12 +96,13 @@ // public void init(EchoClient value) { + Random rnd = new Random(); long ran = rnd.nextInt(5000); try { Thread.sleep(ran); - } catch (InterruptedException e1) { - e1.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); } // readParameters(); @@ -142,18 +143,19 @@ try { if (first) { connectAndAuthenticate(); + accThread = new Thread(new AcceptThread(rfb, 5999)); + accThread.start(); first = false; }else { reConnectAndAuthenticate(); } - accThread = new Thread(new AcceptThread(rfb, 5999)); - accThread.start(); doProtocolInitialisation(); vc = new CuiVncCanvas(this, 0, 0); vc.updateFramebufferSize(); } catch (IOException e) { + System.out.println("Socket error"); // parent no find Random rnd = new Random(); @@ -194,7 +196,6 @@ } counter++; } - // System.exit(0); }catch (Exception e) { System.out.println(e); @@ -328,8 +329,8 @@ } } - - + + void reConnectAndAuthenticate() throws Exception { showConnectionStatus("Initializing...");