示例#1
0
        private NativeExtension()
        {
            this.nativeMethods = LoadNativeMethods();

            // Redirect the native logs as the very first thing after loading the native extension
            // to make sure we don't lose any logs.
            NativeLogRedirector.Redirect(this.nativeMethods);

            // Initialize
            NativeCallbackDispatcher.Init(this.nativeMethods);

            DefaultSslRootsOverride.Override(this.nativeMethods);

            Logger.Debug("gRPC native library loaded successfully.");
        }
示例#2
0
 public NativeMetadataCredentialsPlugin(AsyncAuthInterceptor interceptor)
 {
     this.interceptor          = GrpcPreconditions.CheckNotNull(interceptor, "interceptor");
     this.callbackRegistration = NativeCallbackDispatcher.RegisterCallback(HandleUniversalCallback);
     this.credentials          = Native.grpcsharp_metadata_credentials_create_from_plugin(this.callbackRegistration.Tag);
 }
示例#3
0
 public VerifyPeerCallbackRegistration(VerifyPeerCallback verifyPeerCallback)
 {
     this.verifyPeerCallback   = verifyPeerCallback;
     this.callbackRegistration = NativeCallbackDispatcher.RegisterCallback(HandleUniversalCallback);
 }