Marc,
I was just trying to make the following work: https://docs.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-5.0 <https://docs.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-5.0&tabs=visual-studio> &tabs=visual-studio See the GreeterClient section. I will eventually have 3 high-level message types. Both will be client/server in my ASP.Net Core implementation. If you a pointer to how to do a concrete client for the class provided, that would be wonderful. From: Marc Gravell <[email protected]> Sent: Sunday, February 21, 2021 2:40 PM To: Herbert Falk <[email protected]> Cc: Protocol Buffers <[email protected]> Subject: Re: [protobuf] Unable to get Client Service to work I'm a little confused here... Normally, assuming that this is using the Google implementation, you would have, in your generated code: - a generated concrete client proxy - a generated abstract server stub The client code would "new" the client proxy (the yellow code). Your server code would declare a type that subclasses the abstract stub, and register *that*. You wouldn't need to declare your own client/server core types. Have you perhaps simply not generated the right client/server stubs? On Sun, 21 Feb 2021, 16:01 Herbert Falk, <[email protected] <mailto:[email protected]> > wrote: I have the following *.proto file: package CredentialExchange; option go_package = "gitlab.com/openfmb/psm/ops/protobuf/go-/CredentialExchange <http://gitlab.com/openfmb/psm/ops/protobuf/go-/CredentialExchange> "; option java_package = "pcitek.CredentialExchange"; option java_multiple_files = true; option csharp_namespace = "pcitek.CredentialExchange"; import "uml.proto"; // The greeting service definition. service CredExchangeSend { // Sends a Credential Exchange message rpc Cred (Management) returns (Management) ; } // MISSING DOCUMENTATION!!! message sendCredentialsRequest { // MISSING DOCUMENTATION!!! bytes encrypted = 1 [(uml.option_required_field) = true, (uml.option_multiplicity_min) = 1]; } // MISSING DOCUMENTATION!!! message Management { option (uml.option_openfmb_profile) = true; // Version of the redundancy protocol uint32 version = 1 [(uml.option_required_field) = true, (uml.option_multiplicity_min) = 1]; // Is a number that can be used to correlate request/responses uint32 messageID = 2 [(uml.option_required_field) = true, (uml.option_multiplicity_min) = 1]; // Date and Time at which the message was started to be encoded. string utcTimeOfMessage = 3 [(uml.option_required_field) = true, (uml.option_multiplicity_min) = 1]; // MISSING DOCUMENTATION!!! sendCredentialsRequest sendCredentialsRequest = 4; } I am trying to stage a Client Service for CredExchangeSend. My current service declaration is: public class CredentialExchangeService { public Task<pcitek.CredentialExchange.Management> rxd( pcitek.CredentialExchange.Management request) { PCItek.Redundancy.CredentialExInt.decode(request); return (null); } } For the actual send, I need to pass in the actual Management class filled in. This is what I am trying to do: namespace pcitek.CredentialExchange { public class sendCredentials { public async Task Send(pcitek.CredentialExchange.Management info) { string address = Redundancy.getRedundancyPeerAddress(); using var channel = GrpcChannel.ForAddress(address+":5001"); // var client = new pcitek.CredentialExchange.sendCredentials(channel) } } } The yellow'd statement fails because sendCredentials is not known. Please note I also have: mapped a receiver service to: endpoints.MapGrpcService<PCItek.Redundancy.services.CredentialExchangeService>(); Any help would be appreciated. -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]> . To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/d9500f87-994e-49a7-a30f-658f77652109n%40googlegroups.com <https://groups.google.com/d/msgid/protobuf/d9500f87-994e-49a7-a30f-658f77652109n%40googlegroups.com?utm_medium=email&utm_source=footer> . -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" 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/protobuf/014701d7088b%2449d1c6c0%24dd755440%24%40gmail.com.
