public void ParseCommand(string e, string command) { switch (command) { case "session/list": ApiKey = Jsonparser.GetApiKey(this.PcName, e); //ApiKey = Jsonparser.GetApiKey("johan", e); break; case "tunnel/create": SessionKey = Jsonparser.GetSecondApiKey(e); Commands.tunnelKey = this.SessionKey; break; case "tunnel/send": ParseTunnelData(e); break; //TODO add case for vr hardware callback (such as buttonpresses) default: Environment.Exit(-1); break; } this.@lock = false; }
public void IsStringReceived(string message) { String e = message; String command = Jsonparser.GetCommandIdentifier(e); if (command.Contains("node") || command.Contains("route") || command.Contains("session") || command.Contains("tunnel") || command.Contains("scene")) { VRHandler.getInstance().ParseCommand(e, command); } else { //TODO add route for other TCP trafic } }
public void IsStringReceived(string message) { string e = message; if (e == "") { return; } string command = Jsonparser.GetCommandIdentifier(e); if (command.Contains("node") || command.Contains("route") || command.Contains("session") || command.Contains("tunnel") || command.Contains("scene")) { ParseCommand(e, command); } else { //TODO add route for other TCP trafic } }