Mercurial > hg > Applications > AliceVNC
changeset 23:edf1b800d8b9
need send Server request Test
author | sugi |
---|---|
date | Fri, 07 Nov 2014 17:48:48 +0900 |
parents | fdb036159e61 |
children | 36a9a7de314d |
files | src/main/java/jp/ac/u_ryukyu/alicevnc/NegotiateVNCServer.java src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveChangeRequest.java src/main/java/jp/ac/u_ryukyu/alicevnc/SendChangeRequest.java |
diffstat | 3 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/NegotiateVNCServer.java Fri Nov 07 17:09:08 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/NegotiateVNCServer.java Fri Nov 07 17:48:48 2014 +0900 @@ -35,7 +35,8 @@ } } - + new ReceiveChangeRequest(); + new SendChangeRequest(); } }
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveChangeRequest.java Fri Nov 07 17:09:08 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/ReceiveChangeRequest.java Fri Nov 07 17:48:48 2014 +0900 @@ -21,5 +21,14 @@ @SuppressWarnings("unchecked") List<String> clist = info1.asClass(List.class); + + if (clist.contains("parent")){ + mes.route.add(info.from); + ods.put("parent", "changeRequest", mes); + new ReceiveChangeRequest(); + } else { // this node is root. + System.out.println("coming Server change request from "+ mes.requestNodeName); + } + } } \ No newline at end of file
--- a/src/main/java/jp/ac/u_ryukyu/alicevnc/SendChangeRequest.java Fri Nov 07 17:09:08 2014 +0900 +++ b/src/main/java/jp/ac/u_ryukyu/alicevnc/SendChangeRequest.java Fri Nov 07 17:48:48 2014 +0900 @@ -11,11 +11,13 @@ private Receiver info = ids.create(CommandType.PEEK); // hostName private Receiver info1 = ids.create(CommandType.PEEK); // connection list private Receiver info2 = ids.create(CommandType.PEEK); // AliceVNCConfig + private Receiver info3 = ids.create(CommandType.TAKE); // request public SendChangeRequest(){ info.setKey("host"); info1.setKey("_CLIST"); info2.setKey("AliceVNCConfig"); + info3.setKey("Request"); } @Override @@ -36,7 +38,7 @@ } ods.put(address, "changeRequest", mes); - + new SendChangeRequest(); } }