Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Client and Service are not upgrading

$
0
0

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



Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>