diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-05-08 07:46:46 -0700 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-05-08 07:46:46 -0700 |
commit | fee0cfa0d51078b0cbc398afdb3e552355ad7402 (patch) | |
tree | 5ed54f4f4e9e7d556ac618d3252a35b18e905d67 /src/csharp/Grpc.Core/ServerCallContext.cs | |
parent | 4d706b8dbc042fa758d63e4e3e18ef9ced5c499b (diff) | |
parent | f4d4ae0dd5c5faf1901f63ff05a52880512610d9 (diff) |
Merge github.com:grpc/grpc into churn-churn-churn-the-api-gently-down-the-stream
Conflicts:
src/cpp/server/server.cc
Diffstat (limited to 'src/csharp/Grpc.Core/ServerCallContext.cs')
-rw-r--r-- | src/csharp/Grpc.Core/ServerCallContext.cs | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/csharp/Grpc.Core/ServerCallContext.cs b/src/csharp/Grpc.Core/ServerCallContext.cs new file mode 100644 index 0000000000..e873b3e88a --- /dev/null +++ b/src/csharp/Grpc.Core/ServerCallContext.cs @@ -0,0 +1,56 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Runtime.CompilerServices; +using System.Threading.Tasks; + +namespace Grpc.Core +{ + /// <summary> + /// Context for a server-side call. + /// </summary> + public sealed class ServerCallContext + { + + // TODO(jtattermusch): add cancellationToken + + // TODO(jtattermusch): add deadline info + + // TODO(jtattermusch): expose initial metadata sent by client for reading + + // TODO(jtattermusch): expose method to send initial metadata back to client + + // TODO(jtattermusch): allow setting status and trailing metadata to send after handler completes. + } +} |