/// <summary> /// Constructor /// </summary> /// <param name="channelToRemotePoint">Channel to remote point</param> /// <param name="currentPointChannel">Channel of point from which request will be performed</param> internal Point(Channel channelToRemotePoint, Channel currentPointChannel, ControlSpace space) { if (currentPointChannel == null) { currentPointChannel = channelToRemotePoint; } _pointThatUsingThisPoint = currentPointChannel; Channel = channelToRemotePoint; _controlSpace = space;/* * if (channelToRemotePoint.IP == currentPointChannel.IP && channelToRemotePoint.Type != ChannelType.TCP) * { * _PointServiceClient = ChannelFactory<IPointService>.CreateChannel(WCFSettings.GetNamedPipeBinding(), new EndpointAddress($"net.pipe://{channelToRemotePoint.IP}/{channelToRemotePoint.Port}")); * } * else*/ { _PointServiceClient = ChannelFactory <IPointService> .CreateChannel(WCFSettings.GetTcpBinding(), new EndpointAddress($"net.tcp://{channelToRemotePoint.IP}:{channelToRemotePoint.Port}")); } // }
internal Daemon(string daemonIPAndPort, ControlSpace space) { _linkedControlSpace = space; Name = daemonIPAndPort; _daemon = ChannelFactory <IDaemonService> .CreateChannel(WCFSettings.GetTcpBinding(), new EndpointAddress(daemonIPAndPort)); }