firstApplet = true;
}
- public static void newViewer(VncViewer oldViewer) {
+ public static void newViewer(VncViewer oldViewer, Socket sock) {
VncViewer viewer = new VncViewer();
viewer.applet = oldViewer.applet;
viewer.firstApplet = false;
+ viewer.sock = sock;
viewer.start();
}
+ public static void newViewer(VncViewer oldViewer) {
+ newViewer(oldViewer, null);
+ }
public void init() {
vlog.debug("init called");
public void run() {
CConn cc = null;
- Socket sock = null;
/* Tunnelling support. */
if (via.getValueStr() != null) {
vlog.info("Listening on port "+port);
while (true) {
- sock = listener.accept();
- if (sock != null)
- break;
- //listener.close();
+ Socket new_sock = listener.accept();
+ if (new_sock != null)
+ newViewer(this, new_sock);
}
}
8);
Thread thread;
+ Socket sock;
boolean applet, firstApplet, stop;
Image logo;
static int nViewers;