internal ContextPropagationToken(CallSafeHandle parentCall, DateTime deadline, CancellationToken cancellationToken, ContextPropagationOptions options) { this.parentCall = GrpcPreconditions.CheckNotNull(parentCall); this.deadline = deadline; this.cancellationToken = cancellationToken; this.options = options ?? ContextPropagationOptions.Default; }
public ServerRpcNew(Server server, CallSafeHandle call, string method, string host, Timespec deadline, Metadata requestMetadata) { this.server = server; this.call = call; this.method = method; this.host = host; this.deadline = deadline; this.requestMetadata = requestMetadata; }
public CallSafeHandle CreateCall(CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CallCredentialsSafeHandle credentials) { var result = Native.grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); if (credentials != null) { result.SetCredentials(credentials); } result.Initialize(cq); return result; }
internal ServerCallContext(CallSafeHandle callHandle, string method, string host, DateTime deadline, Metadata requestHeaders, CancellationToken cancellationToken, Func<Metadata, Task> writeHeadersFunc, IHasWriteOptions writeOptionsHolder) { this.callHandle = callHandle; this.method = method; this.host = host; this.deadline = deadline; this.requestHeaders = requestHeaders; this.cancellationToken = cancellationToken; this.writeHeadersFunc = writeHeadersFunc; this.writeOptionsHolder = writeOptionsHolder; }
public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline, CredentialsSafeHandle credentials) { using (Profilers.ForCurrentThread().NewScope("ChannelSafeHandle.CreateCall")) { var result = grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); if (credentials != null) { result.SetCredentials(credentials); } result.SetCompletionRegistry(registry); return result; } }
internal static extern CallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray, CallFlags metadataFlags);
CallSafeHandle IPlatformInvocation.grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline) { return grpcsharp_channel_create_call(channel, parentCall, propagationMask, cq, method, host, deadline); }
GRPCCallError IPlatformInvocation.grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx) { return grpcsharp_call_start_serverside(call, ctx); }
GRPCCallError IPlatformInvocation.grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx) { return grpcsharp_call_send_close_from_client(call, ctx); }
GRPCCallError IPlatformInvocation.grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description) { return grpcsharp_call_cancel_with_status(call, status, description); }
static extern GRPCCallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
static extern GRPCCallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
static extern GRPCCallError grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, WriteFlags writeFlags, bool sendEmptyInitialMetadata);
static extern GRPCCallError grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
static extern GRPCCallError grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags);
static extern GRPCCallError grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description);
static extern GRPCCallError grpcsharp_call_cancel(CallSafeHandle call);
internal static extern CallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, byte[] statusMessage, UIntPtr statusMessageLen, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags);
static extern GRPCCallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
static extern GRPCCallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata);
static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
static extern GRPCCallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
GRPCCallError IPlatformInvocation.grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray) { return grpcsharp_call_start_duplex_streaming(call, ctx, metadataArray); }
static extern GRPCCallError grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx);
GRPCCallError IPlatformInvocation.grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx) { return grpcsharp_call_recv_message(call, ctx); }
static extern GRPCCallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
GRPCCallError IPlatformInvocation.grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials) { return grpcsharp_call_set_credentials(call, credentials); }
static extern GRPCCallError grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray);
public CallSafeHandle CreateCall(CompletionRegistry registry, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline) { var result = grpcsharp_channel_create_call(this, parentCall, propagationMask, cq, method, host, deadline); result.SetCompletionRegistry(registry); return result; }
static extern GRPCCallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
static extern GRPCCallError grpcsharp_call_start_serverside(CallSafeHandle call, [MarshalAs(UnmanagedType.FunctionPtr)] CompletionCallbackDelegate callback);
static extern GRPCCallError grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata);
static extern CStringSafeHandle grpcsharp_call_get_peer(CallSafeHandle call);
internal static extern AuthContextSafeHandle grpcsharp_call_auth_context(CallSafeHandle call);
static extern GRPCCallError grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx);
GRPCCallError IPlatformInvocation.grpcsharp_call_cancel(CallSafeHandle call) { return(grpcsharp_call_cancel(call)); }
static extern GRPCCallError grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx);
GRPCCallError IPlatformInvocation.grpcsharp_call_cancel_with_status(CallSafeHandle call, StatusCode status, string description) { return(grpcsharp_call_cancel_with_status(call, status, description)); }
static extern GRPCCallError grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx);
GRPCCallError IPlatformInvocation.grpcsharp_call_start_unary(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) { return(grpcsharp_call_start_unary(call, ctx, send_buffer, send_buffer_len, metadataArray, writeFlags)); }
static extern GRPCCallError grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials);
GRPCCallError IPlatformInvocation.grpcsharp_call_start_duplex_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray) { return(grpcsharp_call_start_duplex_streaming(call, ctx, metadataArray)); }
GRPCCallError IPlatformInvocation.grpcsharp_call_cancel(CallSafeHandle call) { return grpcsharp_call_cancel(call); }
GRPCCallError IPlatformInvocation.grpcsharp_call_send_close_from_client(CallSafeHandle call, BatchContextSafeHandle ctx) { return(grpcsharp_call_send_close_from_client(call, ctx)); }
GRPCCallError IPlatformInvocation.grpcsharp_call_start_server_streaming(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) { return grpcsharp_call_start_server_streaming(call, ctx, send_buffer, send_buffer_len, metadataArray, writeFlags); }
GRPCCallError IPlatformInvocation.grpcsharp_call_recv_message(CallSafeHandle call, BatchContextSafeHandle ctx) { return(grpcsharp_call_recv_message(call, ctx)); }
GRPCCallError IPlatformInvocation.grpcsharp_call_send_message(CallSafeHandle call, BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, WriteFlags writeFlags, bool sendEmptyInitialMetadata) { return grpcsharp_call_send_message(call, ctx, send_buffer, send_buffer_len, writeFlags, sendEmptyInitialMetadata); }
GRPCCallError IPlatformInvocation.grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx) { return(grpcsharp_call_recv_initial_metadata(call, ctx)); }
GRPCCallError IPlatformInvocation.grpcsharp_call_send_status_from_server(CallSafeHandle call, BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata) { return grpcsharp_call_send_status_from_server(call, ctx, statusCode, statusMessage, metadataArray, sendEmptyInitialMetadata); }
GRPCCallError IPlatformInvocation.grpcsharp_call_start_serverside(CallSafeHandle call, BatchContextSafeHandle ctx) { return(grpcsharp_call_start_serverside(call, ctx)); }
GRPCCallError IPlatformInvocation.grpcsharp_call_recv_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx) { return grpcsharp_call_recv_initial_metadata(call, ctx); }
GRPCCallError IPlatformInvocation.grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray) { return(grpcsharp_call_send_initial_metadata(call, ctx, metadataArray)); }
GRPCCallError IPlatformInvocation.grpcsharp_call_send_initial_metadata(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray) { return grpcsharp_call_send_initial_metadata(call, ctx, metadataArray); }
GRPCCallError IPlatformInvocation.grpcsharp_call_set_credentials(CallSafeHandle call, CallCredentialsSafeHandle credentials) { return(grpcsharp_call_set_credentials(call, credentials)); }
CStringSafeHandle IPlatformInvocation.grpcsharp_call_get_peer(CallSafeHandle call) { return grpcsharp_call_get_peer(call); }
CStringSafeHandle IPlatformInvocation.grpcsharp_call_get_peer(CallSafeHandle call) { return(grpcsharp_call_get_peer(call)); }
static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
static extern CallSafeHandle grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline);
public NewRpcInfo(CallSafeHandle call, string method) { this.call = call; this.method = method; }
CallSafeHandle IPlatformInvocation.grpcsharp_channel_create_call(ChannelSafeHandle channel, CallSafeHandle parentCall, ContextPropagationFlags propagationMask, CompletionQueueSafeHandle cq, string method, string host, Timespec deadline) { return(grpcsharp_channel_create_call(channel, parentCall, propagationMask, cq, method, host, deadline)); }