comparison src/main/java/jp/ac/u_ryukyu/treevnc/TreeVncCommand.java @ 423:ffe01c959cdd

Fix LostChild for root node
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Fri, 22 Jan 2016 07:51:57 +0900
parents 0bbfc23ef8c4
children f7210f834403
comparison
equal deleted inserted replaced
422:752788fdae03 423:ffe01c959cdd
20 private TreeCommand command ; 20 private TreeCommand command ;
21 private Socket connection; 21 private Socket connection;
22 private short value; 22 private short value;
23 public String intf; 23 public String intf;
24 24
25 public TreeVncCommand(TreeRFBProto rfb, String myHostName, TreeCommand command, int port, String hostname, String intf, short value) { 25 public TreeVncCommand(TreeRFBProto rfb, String myHostName, TreeCommand command, int port, String hostname, String intf, short value) {
26 this.rfb = rfb; 26 this.rfb = rfb;
27 this.myHostName = myHostName; 27 this.myHostName = myHostName;
28 this.hostname = hostname; 28 this.hostname = hostname;
29 this.port = port; 29 this.port = port;
30 this.intf= intf; 30 this.intf= intf;
31 this.command = command; 31 this.command = command;
32 this.value = value; 32 this.value = value;
33 } 33 }
34 34
35 public TreeVncCommand(TreeRFBProto rfb, String myHostAddress, TreeCommand newNode, 35 public TreeVncCommand(TreeRFBProto rfb, String myHostAddress, TreeCommand newNode,
36 Writer os, Reader is, Socket connection) { 36 Writer os, Reader is, Socket connection, String intf) {
37 this.rfb = rfb; 37 this.rfb = rfb;
38 this.myHostName = myHostAddress; 38 this.myHostName = myHostAddress;
39 command = newNode; 39 command = newNode;
40 this.os = os; 40 this.os = os;
41 this.is = is; 41 this.is = is;
42 this.connection = connection; 42 this.connection = connection;
43 this.intf = intf;
43 } 44 }
44 45
45 46
46 47
47 48
64 break; 65 break;
65 case LOST_PARENT : 66 case LOST_PARENT :
66 handleLostParent(port,hostname, myHostName); 67 handleLostParent(port,hostname, myHostName);
67 break; 68 break;
68 case NEW_NODE : 69 case NEW_NODE :
69 rfb.newClient(os, is); 70 rfb.newClient(os, is, intf);
70 break; 71 break;
71 case QUIT_LOOP : 72 case QUIT_LOOP :
72 break; 73 break;
73 case LOST_CHILD : 74 case LOST_CHILD :
74 handleLostChild(port, hostname, myHostName, this.value); 75 handleLostChild(port, hostname, myHostName, this.value);