1 #region Copyright notice and license 2 3 // Copyright 2015 gRPC authors. 4 // 5 // Licensed under the Apache License, Version 2.0 (the "License"); 6 // you may not use this file except in compliance with the License. 7 // You may obtain a copy of the License at 8 // 9 // http://www.apache.org/licenses/LICENSE-2.0 10 // 11 // Unless required by applicable law or agreed to in writing, software 12 // distributed under the License is distributed on an "AS IS" BASIS, 13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 // See the License for the specific language governing permissions and 15 // limitations under the License. 16 17 #endregion 18 19 using System; 20 using Grpc.Core; 21 22 namespace Grpc.Core.Internal 23 { 24 /// <summary> 25 /// Details of a newly received RPC. 26 /// </summary> 27 internal struct ServerRpcNew 28 { 29 readonly Server server; 30 readonly CallSafeHandle call; 31 readonly string method; 32 readonly string host; 33 readonly Timespec deadline; 34 readonly Metadata requestMetadata; 35 ServerRpcNewGrpc.Core.Internal.ServerRpcNew36 public ServerRpcNew(Server server, CallSafeHandle call, string method, string host, Timespec deadline, Metadata requestMetadata) 37 { 38 this.server = server; 39 this.call = call; 40 this.method = method; 41 this.host = host; 42 this.deadline = deadline; 43 this.requestMetadata = requestMetadata; 44 } 45 46 public Server Server 47 { 48 get 49 { 50 return this.server; 51 } 52 } 53 54 public CallSafeHandle Call 55 { 56 get 57 { 58 return this.call; 59 } 60 } 61 62 public string Method 63 { 64 get 65 { 66 return this.method; 67 } 68 } 69 70 public string Host 71 { 72 get 73 { 74 return this.host; 75 } 76 } 77 78 public Timespec Deadline 79 { 80 get 81 { 82 return this.deadline; 83 } 84 } 85 86 public Metadata RequestMetadata 87 { 88 get 89 { 90 return this.requestMetadata; 91 } 92 } 93 } 94 } 95