void Initialize(Uri multicastAddress)
        {
            this.viaBehavior = new DiscoveryViaBehavior(multicastAddress);
            base.ListenUri   = multicastAddress;

            TextMessageEncodingBindingElement textBE = new TextMessageEncodingBindingElement();

            textBE.MessageVersion = base.DiscoveryVersion.Implementation.MessageVersion;

            UdpTransportBindingElement udpBE = DiscoveryDefaults.Udp.CreateUdpTransportBindingElement();

            this.udpTransportSettings = new UdpTransportSettings(udpBE);

            CustomBinding binding = new CustomBinding();

            binding.Elements.Add(textBE);
            binding.Elements.Add(udpBE);

            base.MaxAnnouncementDelay = DiscoveryDefaults.Udp.AppMaxDelay;

            base.Address = new EndpointAddress(base.DiscoveryVersion.Implementation.DiscoveryAddress);
            base.Binding = binding;
            base.Behaviors.Add(this.viaBehavior);
            base.Behaviors.Add(new UdpContractFilterBehavior());
        }
Esempio n. 2
0
		// (6), everything falls to here.
		public UdpDiscoveryEndpoint (DiscoveryVersion discoveryVersion, Uri multicastAddress)
			: base (discoveryVersion, ServiceDiscoveryMode.Adhoc, CreateBinding (), new EndpointAddress (discoveryVersion.AdhocAddress))
		{
			ListenUri = multicastAddress;
			TransportSettings = new UdpTransportSettings ();
			MulticastAddress = multicastAddress;
			MaxResponseDelay = TimeSpan.FromMilliseconds (500);
		}
Esempio n. 3
0
		// (6), everything falls to here
		public UdpAnnouncementEndpoint (DiscoveryVersion discoveryVersion, Uri multicastAddress)
			: base (discoveryVersion, CreateBinding (), new EndpointAddress (discoveryVersion.AdhocAddress))
		{
			ListenUri = multicastAddress;
			TransportSettings = new UdpTransportSettings ();
			MulticastAddress = multicastAddress;
			MaxAnnouncementDelay = TimeSpan.FromMilliseconds (500);
		}
Esempio n. 4
0
 // (6), everything falls to here
 public UdpAnnouncementEndpoint(DiscoveryVersion discoveryVersion, Uri multicastAddress)
     : base(discoveryVersion, CreateBinding(discoveryVersion), new EndpointAddress(discoveryVersion.AdhocAddress))
 {
     ListenUri            = multicastAddress;
     TransportSettings    = new UdpTransportSettings();
     MulticastAddress     = multicastAddress;
     MaxAnnouncementDelay = TimeSpan.FromMilliseconds(500);
     Behaviors.Add(new DiscoveryViaUriBehavior(discoveryVersion, multicastAddress));
 }
Esempio n. 5
0
		internal UdpTransportSettings (UdpTransportSettings source)
		{
			DuplicateMessageHistoryLength = source.DuplicateMessageHistoryLength;
			MaxBufferPoolSize = source.MaxBufferPoolSize;
			MaxMulticastRetransmitCount = source.MaxMulticastRetransmitCount;
			MaxPendingMessageCount = source.MaxPendingMessageCount;
			MaxReceivedMessageSize = source.MaxReceivedMessageSize;
			MaxUnicastRetransmitCount = source.MaxUnicastRetransmitCount;
			SocketReceiveBufferSize = source.SocketReceiveBufferSize;
			TimeToLive = source.TimeToLive;
		}
Esempio n. 6
0
 internal UdpTransportSettings(UdpTransportSettings source)
 {
     DuplicateMessageHistoryLength = source.DuplicateMessageHistoryLength;
     MaxBufferPoolSize             = source.MaxBufferPoolSize;
     MaxMulticastRetransmitCount   = source.MaxMulticastRetransmitCount;
     MaxPendingMessageCount        = source.MaxPendingMessageCount;
     MaxReceivedMessageSize        = source.MaxReceivedMessageSize;
     MaxUnicastRetransmitCount     = source.MaxUnicastRetransmitCount;
     MulticastInterfaceId          = source.MulticastInterfaceId;
     SocketReceiveBufferSize       = source.SocketReceiveBufferSize;
     TimeToLive = source.TimeToLive;
 }
        void Initialize(Uri multicastAddress)
        {
            this.viaBehavior = new DiscoveryViaBehavior(multicastAddress);
            base.ListenUri = multicastAddress;

            TextMessageEncodingBindingElement textBE = new TextMessageEncodingBindingElement();
            textBE.MessageVersion = base.DiscoveryVersion.Implementation.MessageVersion;

            UdpTransportBindingElement udpBE = DiscoveryDefaults.Udp.CreateUdpTransportBindingElement();
            this.udpTransportSettings = new UdpTransportSettings(udpBE);

            CustomBinding binding = new CustomBinding();
            binding.Elements.Add(textBE);
            binding.Elements.Add(udpBE);

            base.MaxResponseDelay = DiscoveryDefaults.Udp.AppMaxDelay;
            base.Address = new EndpointAddress(base.DiscoveryVersion.Implementation.DiscoveryAddress);
            base.Binding = binding;
            base.Behaviors.Add(this.viaBehavior);
            base.Behaviors.Add(new UdpReplyToBehavior(udpBE.Scheme));
            base.Behaviors.Add(new UdpContractFilterBehavior());
        }
Esempio n. 8
0
		// (2), everything falls to here.
		public UdpDiscoveryEndpoint (DiscoveryVersion discoveryVersion)
			: base (discoveryVersion, ServiceDiscoveryMode.Adhoc)
		{
			TransportSettings = new UdpTransportSettings ();
		}
		// (2), everything falls to here.
		public UdpAnnouncementEndpoint (DiscoveryVersion discoveryVersion)
			: base (discoveryVersion)
		{
			TransportSettings = new UdpTransportSettings ();
		}