public MediaStream() { client = ChannelFactory<ITVEInteraction>.CreateChannel(new NetNamedPipeBinding() { MaxReceivedMessageSize = 10000000 }, new EndpointAddress("net.pipe://localhost/TV4Home.Server.CoreService/TVEInteractionService")); config = new Configuration(); }
public void CreateChannel() { Binding binding; EndpointAddress endpointAddress; if (IsLocal(ServerName)) { endpointAddress = new EndpointAddress("net.pipe://localhost/TV4Home.Server.CoreService/TVEInteractionService"); binding = new NetNamedPipeBinding { MaxReceivedMessageSize = 10000000 }; } else { endpointAddress = new EndpointAddress(string.Format("http://{0}:4321/TV4Home.Server.CoreService/TVEInteractionService", ServerName)); binding = new BasicHttpBinding { MaxReceivedMessageSize = 10000000 }; } binding.OpenTimeout = TimeSpan.FromSeconds(5); TvServer = ChannelFactory<ITVEInteraction>.CreateChannel(binding, endpointAddress); }