Example #1
0
 /// <summary>
 /// 接続されている各ストリームへパケットを送信します
 /// </summary>
 /// <param name="from">送信元のホスト</param>
 /// <param name="packet">送信するデータ</param>
 /// <param name="group">送信先グループ</param>
 public virtual void Broadcast(Host from, Atom packet, BroadcastGroup group)
 {
     if ((group & (BroadcastGroup.Trackers | BroadcastGroup.Relays)) != 0)
     {
         if (sourceStream != null)
         {
             sourceStream.Post(from, packet);
         }
     }
     if ((group & (BroadcastGroup.Relays)) != 0)
     {
         foreach (var outputStream in outputStreams)
         {
             outputStream.Post(from, packet);
         }
     }
 }