Hi, I understand from documentation adn samples that when using a hybrid mode connection and the client and the service exposed on Service bus start communicating, once that they discover that they are on the smae network, then the connection will get switched to a direct connection what is meant by upgrading. I am using the following code
var factory = new ChannelFactory<IHelloWorld>("HelloWorld"); var client = factory.CreateChannel(); var clientChannel = (IChannel)client; clientChannel.Open(); var status = clientChannel.GetProperty<IHybridConnectionStatus>(); bool upgraded = false; if (status != null) { status.ConnectionStateChanged += (o, e) => { Console.WriteLine("Upgraded!"); upgraded = true; Console.ReadLine(); }; }
State is never changed and this is never fired, the communication continues as if they were not both on my laptop
Thanks