public static class Calls : object
Helper methods for generated clients to make RPC calls. Most users will use this class only indirectly and will be making calls using client object generated from protocol buffer definition files.
Namespace
Grpc.CoreAssembly
Grpc.Core.dll
Methods
AsyncClientStreamingCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse>)
public static AsyncClientStreamingCall<TRequest, TResponse> AsyncClientStreamingCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse> call)
where TRequest : class where TResponse : class
Invokes a client streaming call asynchronously. In client streaming scenario, client sends a stream of requests and server responds with a single response.
Type | Name | Description |
---|---|---|
CallInvocationDetails<TRequest, TResponse> | call | The call definition. |
Type | Description |
---|---|
AsyncClientStreamingCall<TRequest, TResponse> | An awaitable call object providing access to the response. |
Name | Description |
---|---|
TRequest | Type of request messages. |
TResponse | The of response message. |
AsyncDuplexStreamingCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse>)
public static AsyncDuplexStreamingCall<TRequest, TResponse> AsyncDuplexStreamingCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse> call)
where TRequest : class where TResponse : class
Invokes a duplex streaming call asynchronously. In duplex streaming scenario, client sends a stream of requests and server responds with a stream of responses. The response stream is completely independent and both side can be sending messages at the same time.
Type | Name | Description |
---|---|---|
CallInvocationDetails<TRequest, TResponse> | call | The call definition. |
Type | Description |
---|---|
AsyncDuplexStreamingCall<TRequest, TResponse> | A call object providing access to the asynchronous request and response streams. |
Name | Description |
---|---|
TRequest | Type of request messages. |
TResponse | Type of responsemessages. |
AsyncServerStreamingCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse>, TRequest)
public static AsyncServerStreamingCall<TResponse> AsyncServerStreamingCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse> call, TRequest req)
where TRequest : class where TResponse : class
Invokes a server streaming call asynchronously. In server streaming scenario, client sends on request and server responds with a stream of responses.
Type | Name | Description |
---|---|---|
CallInvocationDetails<TRequest, TResponse> | call | The call definition. |
TRequest | req | Request message. |
Type | Description |
---|---|
AsyncServerStreamingCall<TResponse> | A call object providing access to the asynchronous response stream. |
Name | Description |
---|---|
TRequest | Type of request message. |
TResponse | The of response messages. |
AsyncUnaryCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse>, TRequest)
public static AsyncUnaryCall<TResponse> AsyncUnaryCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse> call, TRequest req)
where TRequest : class where TResponse : class
Invokes a simple remote call asynchronously.
Type | Name | Description |
---|---|---|
CallInvocationDetails<TRequest, TResponse> | call | The call definition. |
TRequest | req | Request message. |
Type | Description |
---|---|
AsyncUnaryCall<TResponse> | An awaitable call object providing access to the response. |
Name | Description |
---|---|
TRequest | Type of request message. |
TResponse | The of response message. |
BlockingUnaryCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse>, TRequest)
public static TResponse BlockingUnaryCall<TRequest, TResponse>(CallInvocationDetails<TRequest, TResponse> call, TRequest req)
where TRequest : class where TResponse : class
Invokes a simple remote call in a blocking fashion.
Type | Name | Description |
---|---|---|
CallInvocationDetails<TRequest, TResponse> | call | The call definition. |
TRequest | req | Request message. |
Type | Description |
---|---|
TResponse | The response. |
Name | Description |
---|---|
TRequest | Type of request message. |
TResponse | The of response message. |