Hello, this functionality is not supported in gRPC C#. More generally gRPC C# doesn't support specifying channel arguments (options) when they are custom native objects - this is mostly because it's hard to expose such concept in a safe and idiomatic way in C# library. Instead we only support channel options of type int and string.
On Sun, Oct 20, 2019 at 4:24 AM yuta <[email protected]> wrote: > Hi. > > I want to specify local port number of my grpc client (c#), something like > : > > > ---------------------------------------------------------------------------------------------- > > var socketFactory = ? // how to get socket factory struct from native c++ > library from C# > > var options = new List<ChannelOption>(){ > new ChannelOption("grpc.socket_factory", pointer-to-socket-factory) > }; > > var channel = new Channel(hostname, portnum, new SslCredentials(cert_pem), > options); > > > ---------------------------------------------------------------------------------------------- > > The official api document says "channnel options listed in grpc_types.h > file are available", and I want to access [Line:300] #define > GRPC_ARG_SOCKET_FACTORY "grpc.socket_factory" option. > > https://github.com/grpc/grpc/blob/master/include/grpc/impl/codegen/grpc_types.h > > But I don't know how to access it from C# code. Could you give me a simple > example code to specify local port? > > thank you. > > -- > You received this message because you are subscribed to the Google Groups " > grpc.io" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/grpc-io/257224e1-b309-4ae1-a097-9f25133228f5%40googlegroups.com > <https://groups.google.com/d/msgid/grpc-io/257224e1-b309-4ae1-a097-9f25133228f5%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Jan -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/CACF4M0QWfZBMxB%2BniP8zFPc0gbsUoQZQ-rkE5wJh1QKkjMLd7Q%40mail.gmail.com.
smime.p7s
Description: S/MIME Cryptographic Signature
