# HG changeset patch # User pin # Date 1219831331 -32400 # Node ID d6b94713cf454adbec0e72a41ef8f65572bc9ccd # Parent 4ff7a00b13cc130bee666ad809aec8e41957578f *** empty log message *** diff -r 4ff7a00b13cc -r d6b94713cf45 rep/SessionManager.java --- a/rep/SessionManager.java Wed Aug 27 18:47:47 2008 +0900 +++ b/rep/SessionManager.java Wed Aug 27 19:02:11 2008 +0900 @@ -112,7 +112,7 @@ channel.register(selector, ops); } - private void manager(SocketChannel channel, REPCommand receivedCommand) { + private void manager(REPSocketChannel channel, REPCommand receivedCommand) { if(receivedCommand == null) return; Editor editor; Session session; @@ -365,6 +365,11 @@ } } + private boolean setMaxHost(REPSocketChannel channel, String maxHost2) { + // TODO Auto-generated method stub + return false; + } + private int reverseCmd(int cmd) { int kindOfCmd = 0; switch(cmd){ @@ -392,7 +397,7 @@ ownEditorList.setHost(myHost); } - private void setMaster(boolean b, SocketChannel channel) { + private void setMaster(boolean b, REPSocketChannel channel) { isMaster = b; System.out.println("isMaster = " + b); smList.setMaster(channel); @@ -427,7 +432,7 @@ port = send_port; InetSocketAddress addr = new InetSocketAddress(host, port); try { - SocketChannel sessionchannel = SocketChannel.open(); + REPSocketChannel sessionchannel = REPSocketChannel.open(); sessionchannel.configureBlocking(true); sessionchannel.connect(addr); while(!sessionchannel.finishConnect()){ @@ -443,7 +448,7 @@ } } - private void sm_join(SocketChannel channel){ + private void sm_join(REPSocketChannel channel){ //SM_JOINコマンドを生成。 REPCommand command = new REPCommand(); @@ -465,7 +470,7 @@ smList.add(channel); } - private String getLocalHostName(SocketChannel channel) { + private String getLocalHostName(REPSocketChannel channel) { String host = null; host = channel.socket().getLocalAddress().getHostName(); return host;