Mercurial > hg > RemoteEditor > REPSessionManager
changeset 501:ebfa3b05a8dd
add some comments
author | one |
---|---|
date | Fri, 17 Dec 2010 16:18:26 +0900 |
parents | 66096af6a0e0 |
children | 49b689b17d06 |
files | rep/SessionManager.java test/sematest/TestEditor.java |
diffstat | 2 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/SessionManager.java Mon Oct 25 11:23:21 2010 +0900 +++ b/rep/SessionManager.java Fri Dec 17 16:18:26 2010 +0900 @@ -314,6 +314,8 @@ // Session Manager Command + // join to a session in the Session Manager + // a command from an editor or forwarded by other Session Manager case SMCMD_JOIN: { // first connection or forwarded command @@ -334,6 +336,7 @@ break; + // Acknowledge to the session put command case SMCMD_PUT_ACK: if (forwarder.isDirect()) { // send put_ack to the editor now. @@ -343,11 +346,15 @@ command.setSID(command.sid); forwarder.send(command); } + + // Acknowledge to the session join command case SMCMD_JOIN_ACK: registEditor(forwarder,command); manager.updateGUI(this); break; + // Put a session to the session manager + // Command from an editor or forwarded by a session manager case SMCMD_PUT: { // first connection or forwarded command @@ -412,6 +419,8 @@ } break; + // Session Manager joins to other Session Manager + // Command from Session Manager case SMCMD_SM_JOIN: { // SM_JOIN中にSMCMD_SM_JOINが来たら、これはループなので、 @@ -437,10 +446,12 @@ case SMCMD_SYNC_ACK: break; + // get join ack , pass this to our children case SMCMD_SM_JOIN_ACK: send_sm_join_ack(command.eid, command.sid, command); break; + // session state is changed, rewrite routing table case SMCMD_UPDATE: sendUpdate(command.sid); break;
--- a/test/sematest/TestEditor.java Mon Oct 25 11:23:21 2010 +0900 +++ b/test/sematest/TestEditor.java Fri Dec 17 16:18:26 2010 +0900 @@ -301,6 +301,8 @@ inputLock = false; ns.writeLog("AfterMerge "+text); break; + // master editor changes QUIT_2 to QUIT_2_ACK + // Session manager should do this case SMCMD_QUIT_2 : if (cmd.eid!=eid) { forwardCommand(cmd);