public static IceServer[] GetIceServers(this RegisteredMessage self) { var list = new List <IceServer>(); if (!string.IsNullOrEmpty(self.StunServer)) { list.Add(new IceServer(self.StunServer)); } if (self.RTCServer?.Turn1 != null) { list.Add(CreateIceServer(self.RTCServer.Turn1)); } if (self.RTCServer?.Turn2 != null) { list.Add(CreateIceServer(self.RTCServer.Turn2)); } return(list.ToArray()); }
private void RegisteredAddressRecieved(object sender, RegisteredMessage e) { switch (e.Name) { case "test2": Test2Address = e.ToAddress(); break; case "test3": Test3Address = e.ToAddress(); break; case "test2_1": Test2_1Address = e.ToAddress(); if (Test2_1Process == null) { Test2_1Process = Process.Start(".\nDistribute.WCF.TestExe.exe", "test2_1 " + Address); } break; } }
void regCommand(RegisteredMessage msg) { Status = msg.PlayerName + " joined the game"; }