Beispiel #1
0
 public GrpcServer(FunctionRpc.FunctionRpcBase serviceImpl)
 {
     _server = new Server
     {
         Services = { FunctionRpc.BindService(serviceImpl) },
         Ports    = { new ServerPort("127.0.0.1", ServerPort.PickUnused, ServerCredentials.Insecure) }
     };
 }
Beispiel #2
0
        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();
        }
Beispiel #3
0
        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) }
            };
        }