Mercurial > hg > RemoteEditor > REPSessionManager
diff rep/SessionManager.java @ 22:850a9cc4963a
*** empty log message ***
author | pin |
---|---|
date | Thu, 08 Nov 2007 15:51:43 +0900 |
parents | 2d4bab638a71 |
children | 01657c033761 |
line wrap: on
line diff
--- a/rep/SessionManager.java Thu Nov 08 04:37:59 2007 +0900 +++ b/rep/SessionManager.java Thu Nov 08 15:51:43 2007 +0900 @@ -33,6 +33,7 @@ private SessionManagerList smList; private String myHost; private boolean isMaster = true; + private EditorList editorList; //private SocketChannel sessionchannel; //private boolean co; public SessionManager(int port) { @@ -119,14 +120,15 @@ if(repCmd == null) return; switch(repCmd.cmd){ case REP.SMCMD_JOIN: + editorList.addEditor(repCmd); if(isMaster){ sendJoinAck(channel, repCmd); }else{ - sendJoin(repCmd); + smList.sendJoin(repCmd); } break; case REP.SMCMD_JOIN_ACK: - sendJoinAck(repCmd); + editorList.sendJoinAck(repCmd); break; case REP.SMCMD_PUT: int sessionID = sessionlist.addSession(channel, repCmd.string); //SID‚ðŽæ“¾ @@ -178,9 +180,9 @@ } } - private void sendJoin(REPCommand repCmd) { - smList.sendJoin(repCmd); - } +// private void sendJoin(REPCommand repCmd) { +// smList.sendJoin(repCmd); +// } private void sendSessionManagerJoinAck(SocketChannel channel, REPCommand repCmd) { String socketstring = getSocketString(channel);