/// <summary> /// Start remote debug command. /// </summary> void ConnectedToRemote() { DebugCommandUI commandUI = commandHost as DebugCommandUI; if (IsHost) { if (commandUI != null) { commandUI.Prompt = "[Host]>"; } } else { if (commandUI != null) { commandUI.Prompt = "[Client]>"; } commandHost.PushExecutioner(this); SendPacket(StartPacketHeader, "Remote Debug Command Started!!"); } commandHost.RegisterCommand("quit", "Quit from remote command", ExecuteQuitCommand); }
/// <summary> /// End remote debug command. /// </summary> void DisconnectedFromRemote() { DebugCommandUI commandUI = commandHost as DebugCommandUI; if (commandUI != null) { commandUI.Prompt = DebugCommandUI.DefaultPrompt; } commandHost.UnregisterCommand("quit"); if (!IsHost) { commandHost.PopExecutioner(); if (OwnsNetworkSession) { NetworkSession.Dispose(); NetworkSession = null; OwnsNetworkSession = false; } } }