public GrpcServer(FunctionRpc.FunctionRpcBase serviceImpl) { _server = new Server { Services = { FunctionRpc.BindService(serviceImpl) }, Ports = { new ServerPort("127.0.0.1", ServerPort.PickUnused, ServerCredentials.Insecure) } }; }
public GrpcServer() { var service = new Service(); var x = new Server { Services = { FunctionRpc.BindService(service) }, Ports = { new ServerPort("127.0.0.1", ServerPort.PickUnused, ServerCredentials.Insecure) } }; x.Start(); }
public GrpcServer(FunctionRpc.FunctionRpcBase serviceImpl) { ChannelOption maxReceiveMessageLength = new ChannelOption(ChannelOptions.MaxReceiveMessageLength, MaxMessageLengthBytes); ChannelOption maxSendMessageLength = new ChannelOption(ChannelOptions.MaxSendMessageLength, MaxMessageLengthBytes); ChannelOption[] grpcChannelOptions = { maxReceiveMessageLength, maxSendMessageLength }; _server = new Server(grpcChannelOptions) { Services = { FunctionRpc.BindService(serviceImpl) }, Ports = { new ServerPort("127.0.0.1", ServerPort.PickUnused, ServerCredentials.Insecure) } }; }