/// <summary>
 /// Disconnect the internal channel. Use on shutdown.
 /// </summary>
 void IImageSource.Disconnect()
 {
     if (grpcChannel != null)
     {
         grpcChannel.ShutdownAsync().Wait();
         grpcChannel = null;
         grpcClient  = null;
     }
 }
 /// <summary>
 /// Disconnect the internal channel. Use on shutdown.
 /// </summary>
 public void Disconnect()
 {
     if (grpcChannel != null)
     {
         grpcChannel.ShutdownAsync().Wait();
         grpcChannel = null;
         grpcClient  = null;
     }
 }
 private void EnsureConnection()
 {
     if (grpcChannel == null)
     {
         const int Port = (int)CameraServer.PortNumbers.CameraServerPort;
         grpcChannel = new Channel(this.ServerName + ":" + Port.ToString(), ChannelCredentials.Insecure);
         grpcClient  = new GrpcChannel.GrpcChannelClient(grpcChannel);
     }
 }
 private void EnsureConnection()
 {
     if (grpcChannel == null)
     {
         const int Port = (int)VideoProcessorGrpc.PortNumbers.CameraToVideoProcessorPort;
         grpcChannel = new Channel(this.HostAddress + ":" + Port.ToString(), ChannelCredentials.Insecure);
         grpcClient  = new GrpcChannel.GrpcChannelClient(grpcChannel);
     }
 }