aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/csharp/GrpcCore/ServerCallHandler.cs
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@google.com>2015-02-05 18:15:14 -0800
committerGravatar Jan Tattermusch <jtattermusch@google.com>2015-02-05 18:37:17 -0800
commit15111f5c6b25970c8b5a6413cd147a61ec35fb27 (patch)
tree36b05b1ec2276ae69e9a302f013f517ca9460bd8 /src/csharp/GrpcCore/ServerCallHandler.cs
parent3d6fa14f1a94fcb5c9b917b2e6e76cea6d13f2bb (diff)
Polishing C# math service implementation and added an in-process mathclient mathserver test
Diffstat (limited to 'src/csharp/GrpcCore/ServerCallHandler.cs')
-rw-r--r--src/csharp/GrpcCore/ServerCallHandler.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/csharp/GrpcCore/ServerCallHandler.cs b/src/csharp/GrpcCore/ServerCallHandler.cs
index 08d527a019..67103791b4 100644
--- a/src/csharp/GrpcCore/ServerCallHandler.cs
+++ b/src/csharp/GrpcCore/ServerCallHandler.cs
@@ -22,8 +22,8 @@ namespace Google.GRPC.Core
public void StartCall(string methodName, CallSafeHandle call, CompletionQueueSafeHandle cq)
{
var asyncCall = new AsyncCall<TResponse, TRequest>(
- (msg) => method.ResponseMarshaller.Serialize(msg),
- (payload) => method.RequestMarshaller.Deserialize(payload));
+ method.ResponseMarshaller.Serializer,
+ method.RequestMarshaller.Deserializer);
asyncCall.InitializeServer(call);
asyncCall.Accept(cq);
@@ -34,9 +34,6 @@ namespace Google.GRPC.Core
handler(request, responseObserver);
asyncCall.Halfclosed.Wait();
- // TODO: wait until writing is finished
-
- asyncCall.WriteStatusAsync(new Status(StatusCode.GRPC_STATUS_OK, "")).Wait();
asyncCall.Finished.Wait();
}
}
@@ -55,8 +52,8 @@ namespace Google.GRPC.Core
public void StartCall(string methodName, CallSafeHandle call, CompletionQueueSafeHandle cq)
{
var asyncCall = new AsyncCall<TResponse, TRequest>(
- (msg) => method.ResponseMarshaller.Serialize(msg),
- (payload) => method.RequestMarshaller.Deserialize(payload));
+ method.ResponseMarshaller.Serializer,
+ method.RequestMarshaller.Deserializer);
asyncCall.InitializeServer(call);
asyncCall.Accept(cq);
@@ -68,8 +65,6 @@ namespace Google.GRPC.Core
asyncCall.StartReadingToStream(requestObserver);
asyncCall.Halfclosed.Wait();
-
- asyncCall.WriteStatusAsync(new Status(StatusCode.GRPC_STATUS_OK, "")).Wait();
asyncCall.Finished.Wait();
}
}