コード例 #1
0
ファイル: Message.cs プロジェクト: sschneider1207/Phoenix.Net
 public static Message FromBroadcast(Broadcast broadcast) => new Message(broadcast.Topic, broadcast.Event, broadcast.Payload, null);
コード例 #2
0
 /// <summary>
 /// Send a broadcast to the socket.
 /// </summary>
 public virtual Task SendBroadcast(Broadcast broadcast) => SendByteArray(_socketSerializer.SerializeBroadcast(broadcast));
コード例 #3
0
 public ArraySegment<byte> SerializeBroadcast(Broadcast broadcast)
 {
     var message = Message.FromBroadcast(broadcast);
     return SerializeMessage(message);
 }        
コード例 #4
0
ファイル: Channel.cs プロジェクト: sschneider1207/Phoenix.Net
 public static Task Push(Socket socket, string @event, JObject payload)
 {
     var broadcast = new Broadcast(socket.Topic, @event, payload);
     return socket.Transport.SendBroadcast(broadcast);
 }