Mercurial > hg > trac > TreeVNC > TreeVNC
diff src/viewer_swing/java/com/glavsoft/viewer/Viewer.java @ 97:44f5cdc63a76
don't create Rfb and VNC proxy on change server on root.
author | oc |
---|---|
date | Thu, 22 May 2014 19:45:59 +0900 |
parents | 1503a373ab73 |
children | 01c0fd20c0b4 |
line wrap: on
line diff
--- a/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Thu May 22 17:42:31 2014 +0900 +++ b/src/viewer_swing/java/com/glavsoft/viewer/Viewer.java Thu May 22 19:45:59 2014 +0900 @@ -332,102 +332,3 @@ cuiVersion = flag; } } - - - /* - @Override - public void run() { - - final boolean hasJsch = checkJsch(); - final boolean allowInteractive = allowAppletInteractiveConnections || ! isApplet; - connectionPresenter = new ConnectionPresenter(hasJsch, allowInteractive); - connectionPresenter.addModel("ConnectionParamsModel", connectionParams); - final ConnectionView connectionView = new ConnectionView( - Viewer.this, // appWindowListener - connectionPresenter, hasJsch); - connectionPresenter.addView(ConnectionPresenter.CONNECTION_VIEW, connectionView); - if (isApplet) { - connectionPresenter.addView("AppletStatusStringView", new View() { - @Override - public void showView() { / } - @Override - public void closeView() { } - @SuppressWarnings("UnusedDeclaration") - public void setMessage(String message) { - Viewer.this.getAppletContext().showStatus(message); - } - }); - } - if (forceReconnection) { - System.out.println("error10#####################"); - connectionManager.showReconnectDialog("Connection lost", reconnectionReason); - forceReconnection = false; - } - - - tryAgain = true; - while (tryAgain) { - if(workingSocket==null) - workingSocket = connectionManager.connectToHost(connectionParams, settings, rfb); - if (null == workingSocket) { - closeApp(); - break; - } - logger.info("Connected"); - System.out.println("connection-----------" + workingSocket.getInetAddress()); - try { - workingSocket.setTcpNoDelay(true); // disable Nagle algorithm - Reader reader = new Reader(workingSocket.getInputStream()); - Writer writer = new Writer(workingSocket.getOutputStream()); - - workingProtocol = new Protocol(reader, writer, - new PasswordChooser(passwordFromParams, connectionParams, containerFrame, this), - settings); - workingProtocol.handshake(); - - ClipboardControllerImpl clipboardController = - new ClipboardControllerImpl(workingProtocol, settings.getRemoteCharsetName()); - clipboardController.setEnabled(settings.isAllowClipboardTransfer()); - settings.addListener(clipboardController); - - surface = new Surface(workingProtocol, this, uiSettings.getScaleFactor()); - settings.addListener(this); - uiSettings.addListener(surface); - containerFrame = createContainer(); - connectionManager.setContainerFrame(containerFrame); - updateFrameTitle(); - if(rfb != null) { - rfb.setViewer(this); - runAcceptThread(); - rfb.setProtocolContext(workingProtocol); - rfb.notProxy(); - workingProtocol.startTreeClientHandling(this,surface, clipboardController,rfb); - } else { - workingProtocol.startNormalHandling(this, surface, clipboardController); - } - tryAgain = false; - } catch (UnsupportedProtocolVersionException e) { - connectionManager.showReconnectDialog("Unsupported Protocol Version", e.getMessage()); - logger.severe(e.getMessage()); - } catch (UnsupportedSecurityTypeException e) { - connectionManager.showReconnectDialog("Unsupported Security Type", e.getMessage()); - logger.severe(e.getMessage()); - } catch (AuthenticationFailedException e) { - passwordFromParams = null; - connectionManager.showReconnectDialog("Authentication Failed", e.getMessage()); - logger.severe(e.getMessage()); - } catch (TransportException e) { - connectionManager.showReconnectDialog("Connection Error", "Connection Error" + ": " + e.getMessage()); - logger.severe(e.getMessage()); - } catch (IOException e) { - connectionManager.showReconnectDialog("Connection Error", "Connection Error" + ": " + e.getMessage()); - logger.severe(e.getMessage()); - } catch (FatalException e) { - connectionManager.showReconnectDialog("Connection Error", "Connection Error" + ": " + e.getMessage()); - logger.severe(e.getMessage()); - } - } - } - */ - -