public void Connect() { var binding = new NetTcpBinding(); ChannelFactory <IHealthMonitoring> factory = new ChannelFactory <IHealthMonitoring>(binding, new EndpointAddress("net.tcp://localhost:6000/HealthMonitoring")); proxy = factory.CreateChannel(); //dalje se koristi proxy.IAmAlive() u RunAsync metodi }
public void Connect() { ChannelFactory<IHealthMonitoring> factory = new ChannelFactory<IHealthMonitoring>(new NetTcpBinding(), new EndpointAddress("net.tcp://localhost:11000/HealthMonitoring")); proxy = factory.CreateChannel(); Console.WriteLine("Connected."); }