예제 #1
0
파일: PeerInfo.cs 프로젝트: melnx/Bermuda
        public bool Equals(IPeerInfo other)
        {
            if (other == null)
            {
                return(false);
            }

            return(EndPoint.Equals(other.EndPoint) && Id == other.Id);
        }
예제 #2
0
        public static BermudaServiceClient GetServiceClient(IPeerInfo peer)
        {
            BermudaServiceClient client = null;

            var url      = String.Format("net.tcp://{0}/BermudaService.svc", peer.EndPoint);
            var binding  = new NetTcpBinding(SecurityMode.None);
            var endpoint = new EndpointAddress(new Uri(url));

            HostEnvironment.AdjustBinding(binding);
            client = new BermudaServiceClient(binding, endpoint);

            return(client);
        }
예제 #3
0
        public bool Equals(IPeerInfo other)
        {
            if (other == null) return false;

            return EndPoint.Equals(other.EndPoint) && Id == other.Id;
        }
예제 #4
0
        public static BermudaServiceClient GetServiceClient(IPeerInfo peer)
        {
            BermudaServiceClient client = null;
        
            var url = String.Format("net.tcp://{0}/BermudaService.svc", peer.EndPoint);
            var binding = new NetTcpBinding(SecurityMode.None);
            var endpoint = new EndpointAddress(new Uri(url));
            HostEnvironment.AdjustBinding(binding);
            client = new BermudaServiceClient(binding, endpoint);

            return client;
        }