Esempio n. 1
0
        public static void Configure(ServiceConfiguration config)
        {
            var binding = new NetTcpBinding(SecurityMode.Transport, true);

            config.EnableProtocol(binding);

            config.AddServiceEndpoint(new UdpDiscoveryEndpoint());

            ServiceDiscoveryBehavior serviceDiscoveryBehavior = new ServiceDiscoveryBehavior();

            serviceDiscoveryBehavior.AnnouncementEndpoints.Add(new UdpAnnouncementEndpoint());
            config.Description.Behaviors.Add(serviceDiscoveryBehavior);
        }