annotate src/main/java/jp/ac/u_ryukyu/treevnc/server/VncProxyService.java @ 54:0ae87c7e767c

bug fix
author one
date Tue, 19 Nov 2013 15:29:04 +0900
parents 978261e2b396
children 9fdb8ff88497
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
12c3a73be47f rename package
one
parents: 11
diff changeset
1 package jp.ac.u_ryukyu.treevnc.server;
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 import java.awt.event.*;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 import java.io.*;
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
5 import java.net.ServerSocket;
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
6 import java.net.Socket;
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
7 import java.net.UnknownHostException;
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
8 import java.util.LinkedList;
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 import java.util.logging.Logger;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
31
872d9bcbfe56 Before changing the Viewer.
one
parents: 28
diff changeset
11 import jp.ac.u_ryukyu.treevnc.AcceptThread;
40
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
12 import jp.ac.u_ryukyu.treevnc.server.state.ChangeHost;
31
872d9bcbfe56 Before changing the Viewer.
one
parents: 28
diff changeset
13
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 import com.glavsoft.exceptions.AuthenticationFailedException;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 import com.glavsoft.exceptions.FatalException;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 import com.glavsoft.exceptions.TransportException;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 import com.glavsoft.exceptions.UnsupportedProtocolVersionException;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 import com.glavsoft.exceptions.UnsupportedSecurityTypeException;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 import com.glavsoft.rfb.IChangeSettingsListener;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 import com.glavsoft.rfb.IRfbSessionListener;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 import com.glavsoft.rfb.protocol.Protocol;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 import com.glavsoft.rfb.protocol.ProtocolSettings;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 import com.glavsoft.transport.Reader;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 import com.glavsoft.transport.Writer;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 import com.glavsoft.viewer.ConnectionManager;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 import com.glavsoft.viewer.Viewer;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 import com.glavsoft.viewer.cli.Parser;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 import com.glavsoft.viewer.swing.ClipboardControllerImpl;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 import com.glavsoft.viewer.swing.ParametersHandler;
16
e654b2e4de64 add TreeTask.java
one
parents: 15
diff changeset
30 import com.glavsoft.viewer.swing.Surface;
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 import com.glavsoft.viewer.swing.UiSettings;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 import com.glavsoft.viewer.swing.ParametersHandler.ConnectionParams;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
34 public class VncProxyService extends Viewer implements Runnable,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
35 IRfbSessionListener, IChangeSettingsListener {
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 /**
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 *
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 */
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 private static final long serialVersionUID = 1L;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
12
12c3a73be47f rename package
one
parents: 11
diff changeset
42 public MyRfbProtoProxy rfb;
37
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
43 private ConnectionManager connectionManager;
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
44 private ConnectionParams connectionParams;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
45
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
46 public static final int DEFAULT_PORT = 5900;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
47 public static Logger logger = Logger.getLogger("com.glavsoft");
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
48 private boolean forceReconnection;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
49 private String reconnectionReason;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
50 private final ProtocolSettings settings;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
51 private final UiSettings uiSettings;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
52 private AcceptThread acceptThread;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
53 private GetBroadCastProxy getCast;
40
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
54 public AcceptClient aClient;
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
55 public int opendPort;
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
56
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
57 private VncProxyService prevVps;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
58 static VncProxyService currentVps;
50
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
59 private int fbWidth = 0;
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
60 private int fbHeight = 0;
13
406fa09ae645 modify VncProxyService.java
one
parents: 12
diff changeset
61 // public AcceptClient acc;
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
62
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
63 private void initProxy(Parser parser) {
40
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
64 aClient = new AcceptClient();
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
65 ParametersHandler.completeSettingsFromCLI(parser, connectionParams,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
66 settings, uiSettings);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 showControls = ParametersHandler.showControls;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 passwordFromParams = parser.getValueFor(ParametersHandler.ARG_PASSWORD);
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 logger.info("TightVNC Viewer version " + ver());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 isApplet = false;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
72
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 public VncProxyService() {
37
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
74 connectionManager = new ConnectionManager(this, isApplet);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 connectionParams = new ParametersHandler.ConnectionParams();
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 settings = ProtocolSettings.getDefaultSettings();
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 uiSettings = super.uiSettings;
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
78 connectionParams.hostName = "localhost";
52
986f16afb753 update before change host.
one
parents: 50
diff changeset
79 setIsClient(false);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
81
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
82
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
83 public VncProxyService(VncProxyService vps, String hostName) {
f3b775d3592a create newVps.
one
parents: 46
diff changeset
84 this();
f3b775d3592a create newVps.
one
parents: 46
diff changeset
85 connectionParams.hostName = hostName;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
86 rfb = vps.rfb;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
87 isClient = vps.isClient;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
88 forceReconnection = vps.forceReconnection;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
89 reconnectionReason = vps.reconnectionReason;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
90 acceptThread = vps.acceptThread;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
91 getCast = vps.getCast;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
92 aClient = vps.aClient;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
93 opendPort = vps.opendPort;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
94 prevVps = vps;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
95 }
f3b775d3592a create newVps.
one
parents: 46
diff changeset
96
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
97 public static void main(String[] argv) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 String[] mainArgs = argv;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 System.out.println(mainArgs.length);
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 // input into arguments Decision
50
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
101
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 Parser parser = new Parser();
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 ParametersHandler.completeParserOptions(parser);
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
104
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 parser.parse(argv);
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
106 if (parser.isSet(ParametersHandler.ARG_HELP)) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 printUsage(parser.optionsUsage());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 System.exit(0);
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 }
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
110 VncProxyService vps = new VncProxyService();
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
111 vps.initProxy1(argv, mainArgs, parser);
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
112 }
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
113
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
114 private void initProxy1(String[] argv, String[] mainArgs,
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
115 Parser parser) {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
116 initProxy(parser);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
117 if (mainArgs.length != 0) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 for (int i = 0; i < argv.length; i++) {
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
119 setArguments(mainArgs);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 // write later
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 }
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 } else {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
123 // getHostData();
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 }
48
6ebe870da138 this version resolve change host problem.
one
parents: 47
diff changeset
125 run1();
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
126 createConnectionAndStart();
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
127 getChangeScreenRequest(); // Should be used Client Socket.
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
128 try {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
129 threadSetAndStart();
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
130 } catch (UnknownHostException e) {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
131
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
132 } catch (IOException e) {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
133
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
134 }
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
136
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 private void setArguments(String[] mainArgs) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 }
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
139
f3b775d3592a create newVps.
one
parents: 46
diff changeset
140
f3b775d3592a create newVps.
one
parents: 46
diff changeset
141 public boolean run1() {
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
142
40
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
143 rfb = new MyRfbProtoProxy();
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
144 // getHostData();
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 if (forceReconnection) {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
146 connectionManager.showReconnectDialog("Connection lost",
49
b0c7fad4c695 framebufferupdate : incremental = false
one
parents: 48
diff changeset
147 prevVps.reconnectionReason);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 forceReconnection = false;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
149 }
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 tryAgain = true;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 while (tryAgain) {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
152 // connectionParams.hostName = arguments[0];
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
153 // workingSocket =
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
154 // connectionManager.connectToTreeHost(connectionParams, settings);
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
155 workingSocket = connectionManager.connectToHost(connectionParams,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
156 settings, rfb);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 if (null == workingSocket) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 closeApp();
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 break;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 }
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 logger.info("Connected");
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 try {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
163 workingSocket.setTcpNoDelay(true); // disable Nagle algorithm
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 Reader reader = new Reader(workingSocket.getInputStream());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 Writer writer = new Writer(workingSocket.getOutputStream());
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
166 // rfb.setStream(reader,writer);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 workingProtocol = new Protocol(reader, writer,
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
168 new PasswordChooser(passwordFromParams,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
169 connectionParams, containerFrame, this),
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 settings);
50
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
171 if(fbWidth!=0)
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
172 workingProtocol.setScreenSizeRetina(fbWidth, fbHeight);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
173 workingProtocol.handshake();
27
85958cba5d15 Create new constructor in TreeTask
one
parents: 23
diff changeset
174 rfb.setProtocolContext(workingProtocol);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 // input into change parents
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
176 ClipboardControllerImpl clipboardController = new ClipboardControllerImpl(
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
177 workingProtocol, settings.getRemoteCharsetName());
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
178 clipboardController.setEnabled(settings
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
179 .isAllowClipboardTransfer());
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 settings.addListener(clipboardController);
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
181 surface = new Surface(workingProtocol, this,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
182 uiSettings.getScaleFactor()); // this method
19
ea83f4be0cc9 remove is and os
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
183 settings.addListener(this);
ea83f4be0cc9 remove is and os
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
184 uiSettings.addListener(surface);
ea83f4be0cc9 remove is and os
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
185 containerFrame = createContainer();
ea83f4be0cc9 remove is and os
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
186 connectionManager.setContainerFrame(containerFrame);
ea83f4be0cc9 remove is and os
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
187 updateFrameTitle();
37
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
188 containerFrame.dispose();
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
189 containerFrame = null;
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
190 if (prevVps != null) {
f3b775d3592a create newVps.
one
parents: 46
diff changeset
191 prevVps.cleanUpSession();
f3b775d3592a create newVps.
one
parents: 46
diff changeset
192 prevVps = null;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
193 }
f3b775d3592a create newVps.
one
parents: 46
diff changeset
194 currentVps = this;
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
195 workingProtocol.startNormalHandling(this, surface,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
196 clipboardController, rfb);
20
98519d16a8c3 getInitData from ProtocolContext
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
197 // rfb.setInitData(workingProtocol.getInitData()); too early
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
198 // workingProtocol.startNormalHandling(this, surface,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
199 // clipboardController);
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
200 tryAgain = false;
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 } catch (UnsupportedProtocolVersionException e) {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
202 connectionManager.showReconnectDialog(
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
203 "Unsupported Protocol Version", e.getMessage());
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 logger.severe(e.getMessage());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 } catch (UnsupportedSecurityTypeException e) {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
206 connectionManager.showReconnectDialog(
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
207 "Unsupported Security Type", e.getMessage());
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
208 logger.severe(e.getMessage());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 } catch (AuthenticationFailedException e) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
210 passwordFromParams = null;
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
211 connectionManager.showReconnectDialog("Authentication Failed",
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
212 e.getMessage());
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
213 logger.severe(e.getMessage());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
214 } catch (TransportException e) {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
215 connectionManager.showReconnectDialog("Connection Error",
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
216 "Connection Error" + ": " + e.getMessage());
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
217 logger.severe(e.getMessage());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
218 } catch (IOException e) {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
219 connectionManager.showReconnectDialog("Connection Error",
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
220 "Connection Error" + ": " + e.getMessage());
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
221 logger.severe(e.getMessage());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
222 } catch (FatalException e) {
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
223 connectionManager.showReconnectDialog("Connection Error",
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
224 "Connection Error" + ": " + e.getMessage());
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
225 logger.severe(e.getMessage());
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
226 }
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
227 }
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
228 return !tryAgain;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
229 }
f3b775d3592a create newVps.
one
parents: 46
diff changeset
230
f3b775d3592a create newVps.
one
parents: 46
diff changeset
231 private void cleanUpSession() {
f3b775d3592a create newVps.
one
parents: 46
diff changeset
232 if (prevVps != null) {
f3b775d3592a create newVps.
one
parents: 46
diff changeset
233 prevVps.cleanUpSession();
f3b775d3592a create newVps.
one
parents: 46
diff changeset
234 prevVps = null;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
235 }
f3b775d3592a create newVps.
one
parents: 46
diff changeset
236 workingProtocol.cleanUpSession();
13
406fa09ae645 modify VncProxyService.java
one
parents: 12
diff changeset
237 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
238
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
239 public void createConnectionAndStart() {
40
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
240 Thread thread;
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
241 opendPort = rfb.selectPort(5999);
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
242 acceptThread = new AcceptThread(rfb, opendPort);
3c072f2f39bb add Screen change function.
one
parents: 38
diff changeset
243 thread = new Thread(acceptThread);
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
244 thread.start();
13
406fa09ae645 modify VncProxyService.java
one
parents: 12
diff changeset
245 getCast = new GetBroadCastProxy(this,
406fa09ae645 modify VncProxyService.java
one
parents: 12
diff changeset
246 workingProtocol.getRemoteDesktopName(),
406fa09ae645 modify VncProxyService.java
one
parents: 12
diff changeset
247 this.connectionParams.hostName);
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
248 thread = new Thread(getCast);
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
249 thread.start();
13
406fa09ae645 modify VncProxyService.java
one
parents: 12
diff changeset
250 }
50
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
251
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
252
50
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
253 public void proxyStart(String[] argv,int width,int height) {
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
254 fbWidth = width;
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
255 fbHeight = height;
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
256 proxyStart(argv);
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
257 }
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
258
34
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
259 public void proxyStart(String[] argv) {
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
260 String[] mainArgs = argv;
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
261 System.out.println(mainArgs.length);
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
262 // input into arguments Decision
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
263 Parser parser = new Parser();
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
264 ParametersHandler.completeParserOptions(parser);
50
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
265 if(fbWidth==0)
225e3873d75f Modified to be able to specify the region of the screen in the argument.
one
parents: 49
diff changeset
266 parser.parse(argv);
34
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
267 if (parser.isSet(ParametersHandler.ARG_HELP)) {
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
268 printUsage(parser.optionsUsage());
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
269 System.exit(0);
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
270 }
49
b0c7fad4c695 framebufferupdate : incremental = false
one
parents: 48
diff changeset
271 initProxy1(argv, mainArgs, parser);
34
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
272 }
f70008073a03 add TreeViewer.java
one
parents: 31
diff changeset
273
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
274 @Override
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
275 public void destroy() {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
276
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
277 }
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
278
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
279 @Override
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
280 public void windowClosing(WindowEvent e) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
281 if (e != null && e.getComponent() != null) {
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
282 e.getWindow().setVisible(false);
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
283 }
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
284 closeApp();
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
285 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
286
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
287 private void threadSetAndStart() throws UnknownHostException, IOException {
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
288 CreateThread createThread = new CreateThread(aClient);
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
289 Thread thread = new Thread(createThread);
37
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
290 thread.start();
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
291 Thread thread2 = new Thread(new ChangeHost(this, forceReconnection));
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
292 thread2.start();
37
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
293 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
294
37
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
295 public void setConnectionManager(ConnectionManager _connectionManager) {
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
296 connectionManager = _connectionManager;
1454d6fe96c1 add Changehost.java
one
parents: 35
diff changeset
297 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
298
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
299 private void getChangeScreenRequest() {
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
300 Thread th = new Thread(new Runnable() {
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
301 @Override
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
302 public void run() {
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
303 while (true) {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
304 try {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
305 Socket clientSocket = null;
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
306 ServerSocket echoServer = new ServerSocket(10001);
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
307 while (true) {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
308 clientSocket = echoServer.accept();
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
309 BufferedReader is = new BufferedReader(
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
310 new InputStreamReader(
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
311 clientSocket.getInputStream()));
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
312 String newHostName = is.readLine();
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
313 // String screenSize = is.readLine();
54
0ae87c7e767c bug fix
one
parents: 53
diff changeset
314 if(permitChangeScreen()) {
0ae87c7e767c bug fix
one
parents: 53
diff changeset
315 changeVNCServer(newHostName);
0ae87c7e767c bug fix
one
parents: 53
diff changeset
316 } else {
0ae87c7e767c bug fix
one
parents: 53
diff changeset
317 continue;
0ae87c7e767c bug fix
one
parents: 53
diff changeset
318 }
46
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
319 clientSocket.close();
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
320 }
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
321 } catch (IOException e) {
d2741b80399e extract method and delete tempWorkingProtocol.
one
parents: 45
diff changeset
322 continue; // log
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
323 }
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
324 }
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
325 }
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
326 });
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
327 th.start();
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
328 }
54
0ae87c7e767c bug fix
one
parents: 53
diff changeset
329
0ae87c7e767c bug fix
one
parents: 53
diff changeset
330 private boolean permitChangeScreen() {
0ae87c7e767c bug fix
one
parents: 53
diff changeset
331
0ae87c7e767c bug fix
one
parents: 53
diff changeset
332 return true;
0ae87c7e767c bug fix
one
parents: 53
diff changeset
333 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
334
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
335 protected void socketClose() {
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
336 try {
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
337 workingSocket.close();
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
338 acceptThread.flag = true;
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
339 getCast.setStopFlag(true);
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
340 // createThread.setStopFlag(true);
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
341 } catch (IOException e) {/* nop */
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
342 }
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
343 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
344
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
345 @Override
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
346 public void rfbSessionStopped(final String reason) {
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
347 if (workingSocket != null && workingSocket.isConnected()) {
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
348 try {
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
349 workingSocket.close();
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
350 } catch (IOException e) { /* nop */
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
351 }
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
352 }
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
353 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
354
53
978261e2b396 screen change for client
one
parents: 52
diff changeset
355 private void createSocketAndSend(LinkedList<String> clientList, String host, String port)
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
356 throws UnknownHostException, IOException {
42
fe38611c4b2b change the location of the call cleanUpSession().
one
parents: 40
diff changeset
357 boolean passFlag = false;
53
978261e2b396 screen change for client
one
parents: 52
diff changeset
358 int count = 0;
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
359 for (String client : clientList) {
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
360 if (passFlag) {
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
361 Socket echoSocket;
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
362 echoSocket = new Socket(client, 10001);
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
363 DataOutputStream os = new DataOutputStream(
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
364 echoSocket.getOutputStream());
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
365 os.writeBytes("reconnection\n");
53
978261e2b396 screen change for client
one
parents: 52
diff changeset
366 // if(count++ < aClient.getTreeBranch())
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
367 os.writeBytes(port + "\n");
53
978261e2b396 screen change for client
one
parents: 52
diff changeset
368 // else
978261e2b396 screen change for client
one
parents: 52
diff changeset
369 // os.writeBytes(5999 + "\n");
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
370 os.close();
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
371 }
42
fe38611c4b2b change the location of the call cleanUpSession().
one
parents: 40
diff changeset
372 passFlag = true;
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
373 }
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
374 }
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
375
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
376 public void changeVNCServer(String hostName) throws UnknownHostException,
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
377 IOException {
42
fe38611c4b2b change the location of the call cleanUpSession().
one
parents: 40
diff changeset
378 // sender and reader stop
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
379 VncProxyService newVps = new VncProxyService(this,hostName);
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
380 // run call and change workingProtocol
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
381 newVps.connectionParams.hostName = hostName;
f3b775d3592a create newVps.
one
parents: 46
diff changeset
382 if (newVps.run1()) {
f3b775d3592a create newVps.
one
parents: 46
diff changeset
383 newVps.createConnectionAndStart();
53
978261e2b396 screen change for client
one
parents: 52
diff changeset
384 newVps.createSocketAndSend(aClient.getList(), hostName, String.valueOf(newVps.opendPort));
47
f3b775d3592a create newVps.
one
parents: 46
diff changeset
385 } else {
f3b775d3592a create newVps.
one
parents: 46
diff changeset
386 newVps.cleanUpSession();
f3b775d3592a create newVps.
one
parents: 46
diff changeset
387 }
38
c2f0b6907448 add doc directory
one
parents: 37
diff changeset
388 }
45
20326a4b9d88 create new change button for client.
one
parents: 43
diff changeset
389
11
57ae9fbb1245 add files
Taninari YU <you@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
390 }