public ParticipantChangedEventArgs(RtpCommunicator communicator, Multicast multicast, Participant participant, ParticipantChangedType type)
 {
     this.Communicator = communicator;
     this.Multicast    = multicast;
     this.Participant  = participant;
     this.Type         = type;
 }
Beispiel #2
0
        private Message CreateIAmHereMessage(Multicast multicast, string destination)
        {
            DTObject header = DTObject.Create();

            header.SetValue(MessageField.MessageType, (byte)MessageType.IAmHere);
            header.SetValue(MessageField.MulticastAddress, multicast.Address);
            header.SetValue(MessageField.Destination, destination);
            return(new Message(header, multicast.Host.Data));
        }
Beispiel #3
0
        internal static void AsyncRaiseParticipantRemoved(object sender, Multicast multicast, Participant participant, bool isLocal)
        {
            if (ParticipantRemoved == null)
            {
                return;
            }

            object[] args = { sender, new ParticipantEventArgs(multicast, participant, isLocal) };
            AnycastEventThrower.QueueUserWorkItem(new RaiseEvent(_RaiseParticipantRemoved), args);
        }
        public Multicast Join(string multicastAddress, Participant participant)
        {
            var multicast = GetMulticast(multicastAddress);

            if (multicast != null)
            {
                return(multicast);
            }

            lock (_multicasts)
            {
                multicast = GetMulticast(multicastAddress);
                if (multicast != null)
                {
                    return(multicast);
                }

                multicast = new Multicast(this, multicastAddress, participant);
                multicast.Join();
                _multicasts.Add(multicast);
            }
            return(multicast);
        }
Beispiel #5
0
 private void RaiseParticipantChanged(Multicast multicast, Participant participant, ParticipantChangedType type)
 {
     _participantTrigger.Raise(new ParticipantChangedEventArgs(this, multicast, participant, type));
 }
Beispiel #6
0
 public ParticipantEventArgs(Multicast multicast, Participant participant, bool isLocal)
 {
     this.Multicast   = multicast;
     this.Participant = participant;
     this.IsLocal     = isLocal;
 }