Пример #1
0
 public void Unsubscribe(string @event, string controller)
 {
     var sub = new XSubscription { Event = @event, Confirm = false };
     var jsonSub = this.Serializer.Serialize(sub);
     var json = this.Serializer.Serialize(new Model.Message(jsonSub, Constants.PubSub.Unsubscribe, controller));
     this.Socket.Send(Encoding.UTF8.GetBytes(json));
 }
Пример #2
0
 public void Subscribe(string @event, string controller)
 {
     var sub = new XSubscription {Event = @event, Confirm = false};
     var jsonSub = this.Serializer.Serialize(sub);
     var json = this.Serializer.Serialize(new Model.Message(jsonSub, Constants.PubSub.Subscribe, controller));
     this.Socket.Send(new XDataFrame(json).ToBytes());         
 }