comparison src/VncViewer.java @ 8:67caa17deb6f

create accept setSoTimeout initServSock
author e085711
date Sat, 16 Apr 2011 01:08:39 +0900
parents 10dbc0e61adf
children c0ad3ecdf827
comparison
equal deleted inserted replaced
7:d759a2ab6a7a 8:67caa17deb6f
54 v.start(); 54 v.start();
55 } 55 }
56 56
57 String[] mainArgs; 57 String[] mainArgs;
58 58
59 RfbProto rfb; 59 // RfbProto rfb;
60 MyRfbProto rfb;
60 Thread rfbThread; 61 Thread rfbThread;
61 62
62 Frame vncFrame; 63 Frame vncFrame;
63 Container vncContainer; 64 Container vncContainer;
64 ScrollPane desktopScrollPane; 65 ScrollPane desktopScrollPane;
322 validate(); 323 validate();
323 } 324 }
324 325
325 showConnectionStatus("Connecting to " + host + ", port " + port + "..."); 326 showConnectionStatus("Connecting to " + host + ", port " + port + "...");
326 327
327 rfb = new RfbProto(host, port, this); 328 // rfb = new RfbProto(host, port, this);
329 rfb = new MyRfbProto(host, port, this);
328 showConnectionStatus("Connected to server"); 330 showConnectionStatus("Connected to server");
329 331
330 rfb.readVersionMsg(); 332 rfb.readVersionMsg();
331 showConnectionStatus("RFB server supports protocol version " 333 showConnectionStatus("RFB server supports protocol version "
332 + rfb.serverMajor + "." + rfb.serverMinor); 334 + rfb.serverMajor + "." + rfb.serverMinor);
442 // 444 //
443 445
444 void doProtocolInitialisation() throws IOException { 446 void doProtocolInitialisation() throws IOException {
445 rfb.writeClientInit(); 447 rfb.writeClientInit();
446 rfb.readServerInit(); 448 rfb.readServerInit();
449
450 if (rfb.MYVNC) {
451 rfb.initServSock(5550);
452 rfb.accept();
453 }
447 454
448 System.out.println("Desktop name is " + rfb.desktopName); 455 System.out.println("Desktop name is " + rfb.desktopName);
449 System.out.println("Desktop size is " + rfb.framebufferWidth + " x " 456 System.out.println("Desktop size is " + rfb.framebufferWidth + " x "
450 + rfb.framebufferHeight); 457 + rfb.framebufferHeight);
451 458