changeset 139:d6b94713cf45

*** empty log message ***
author pin
date Wed, 27 Aug 2008 19:02:11 +0900
parents 4ff7a00b13cc
children 01062be677e9
files rep/SessionManager.java
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;