public Push Push(string event_, JObject payload = null) { if (!_alreadyJoinedOnce) { throw new Exception(string.Format("tried to push {0} to {1} before joining. Use Channel.Join() before pushing events", event_, payload)); } var pushEvent = new Push(this, event_, payload); if (CanPush()) { pushEvent.Send(); } else { _pushBuffer.Add(pushEvent); } return(pushEvent); }
private void SendJoin() { _state = ChannelState.Joining; _joinPush.Send(); }
public Push Push(string event_, JObject payload = null) { if (!_alreadyJoinedOnce) { throw new Exception(string.Format("tried to push {0} to {1} before joining. Use Channel.Join() before pushing events", event_, payload)); } var pushEvent = new Push(this, event_, payload); if (CanPush()) { pushEvent.Send(); } else { _pushBuffer.Add(pushEvent); } return pushEvent; }