/// <summary> /// Sends the surrender message /// </summary> /// <returns><c>true</c>, if surrender was sent, <c>false</c> otherwise.</returns> /// <param name="message">Message.</param> public bool SendSurrender(SurrenderMessage message) { EnsureUsername(message); if (client.IsConnected && client.IsSubscribed(Channel)) { string data = System.Web.HttpUtility.UrlEncode(JsonConvert.SerializeObject(message)); client.Send(Channel, data); client.Unsubscribe(Channel); } else { throw new Exception("not connected. Call Join Game first"); } return(true); }
private void btnUnsubscribe_Click(object sender, EventArgs e) { Log(String.Format("Unsubscribing from: {0}...", txtClientChannel.Text)); _ortc.Unsubscribe(txtClientChannel.Text); }
public void DoUnsubscribe(object sender, RoutedEventArgs e) { ortcClient.Unsubscribe(Channel); }
public void DoUnsubscribe(object s, EventArgs e) { Log("Unsubscribing..."); client.Unsubscribe(Channel); }
public void LeaveGame(string gameId, string userName) { ortcClient.Unsubscribe(GameId); GameId = null; }
void Unsubscribe() { Log(String.Format("Unsubscribing from: {0}...", Channel)); _ortc.Unsubscribe(Channel); }