|
|
@ -510,22 +510,27 @@ grpcsharp_call_start_unary(grpc_call *call, grpcsharp_batch_context *ctx, |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[1].op = GRPC_OP_SEND_MESSAGE; |
|
|
|
ops[1].op = GRPC_OP_SEND_MESSAGE; |
|
|
|
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); |
|
|
|
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); |
|
|
|
ops[1].data.send_message = ctx->send_message; |
|
|
|
ops[1].data.send_message = ctx->send_message; |
|
|
|
ops[1].flags = write_flags; |
|
|
|
ops[1].flags = write_flags; |
|
|
|
|
|
|
|
ops[1].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[2].op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; |
|
|
|
ops[2].op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; |
|
|
|
ops[2].flags = 0; |
|
|
|
ops[2].flags = 0; |
|
|
|
|
|
|
|
ops[2].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[3].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[3].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[3].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[3].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[3].flags = 0; |
|
|
|
ops[3].flags = 0; |
|
|
|
|
|
|
|
ops[3].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[4].op = GRPC_OP_RECV_MESSAGE; |
|
|
|
ops[4].op = GRPC_OP_RECV_MESSAGE; |
|
|
|
ops[4].data.recv_message = &(ctx->recv_message); |
|
|
|
ops[4].data.recv_message = &(ctx->recv_message); |
|
|
|
ops[4].flags = 0; |
|
|
|
ops[4].flags = 0; |
|
|
|
|
|
|
|
ops[4].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[5].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[5].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[5].data.recv_status_on_client.trailing_metadata = |
|
|
|
ops[5].data.recv_status_on_client.trailing_metadata = |
|
|
@ -538,6 +543,7 @@ grpcsharp_call_start_unary(grpc_call *call, grpcsharp_batch_context *ctx, |
|
|
|
ops[5].data.recv_status_on_client.status_details_capacity = |
|
|
|
ops[5].data.recv_status_on_client.status_details_capacity = |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
ops[5].flags = 0; |
|
|
|
ops[5].flags = 0; |
|
|
|
|
|
|
|
ops[5].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
@ -556,14 +562,17 @@ grpcsharp_call_start_client_streaming(grpc_call *call, |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[1].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[1].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[1].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[1].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[1].flags = 0; |
|
|
|
ops[1].flags = 0; |
|
|
|
|
|
|
|
ops[1].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[2].op = GRPC_OP_RECV_MESSAGE; |
|
|
|
ops[2].op = GRPC_OP_RECV_MESSAGE; |
|
|
|
ops[2].data.recv_message = &(ctx->recv_message); |
|
|
|
ops[2].data.recv_message = &(ctx->recv_message); |
|
|
|
ops[2].flags = 0; |
|
|
|
ops[2].flags = 0; |
|
|
|
|
|
|
|
ops[2].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[3].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[3].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[3].data.recv_status_on_client.trailing_metadata = |
|
|
|
ops[3].data.recv_status_on_client.trailing_metadata = |
|
|
@ -576,6 +585,7 @@ grpcsharp_call_start_client_streaming(grpc_call *call, |
|
|
|
ops[3].data.recv_status_on_client.status_details_capacity = |
|
|
|
ops[3].data.recv_status_on_client.status_details_capacity = |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
ops[3].flags = 0; |
|
|
|
ops[3].flags = 0; |
|
|
|
|
|
|
|
ops[3].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
@ -593,18 +603,22 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming( |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[1].op = GRPC_OP_SEND_MESSAGE; |
|
|
|
ops[1].op = GRPC_OP_SEND_MESSAGE; |
|
|
|
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); |
|
|
|
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); |
|
|
|
ops[1].data.send_message = ctx->send_message; |
|
|
|
ops[1].data.send_message = ctx->send_message; |
|
|
|
ops[1].flags = write_flags; |
|
|
|
ops[1].flags = write_flags; |
|
|
|
|
|
|
|
ops[1].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[2].op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; |
|
|
|
ops[2].op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; |
|
|
|
ops[2].flags = 0; |
|
|
|
ops[2].flags = 0; |
|
|
|
|
|
|
|
ops[2].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[3].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[3].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[3].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[3].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[3].flags = 0; |
|
|
|
ops[3].flags = 0; |
|
|
|
|
|
|
|
ops[3].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[4].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[4].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[4].data.recv_status_on_client.trailing_metadata = |
|
|
|
ops[4].data.recv_status_on_client.trailing_metadata = |
|
|
@ -617,6 +631,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming( |
|
|
|
ops[4].data.recv_status_on_client.status_details_capacity = |
|
|
|
ops[4].data.recv_status_on_client.status_details_capacity = |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
ops[4].flags = 0; |
|
|
|
ops[4].flags = 0; |
|
|
|
|
|
|
|
ops[4].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
@ -635,10 +650,12 @@ grpcsharp_call_start_duplex_streaming(grpc_call *call, |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[1].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[1].op = GRPC_OP_RECV_INITIAL_METADATA; |
|
|
|
ops[1].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[1].data.recv_initial_metadata = &(ctx->recv_initial_metadata); |
|
|
|
ops[1].flags = 0; |
|
|
|
ops[1].flags = 0; |
|
|
|
|
|
|
|
ops[1].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
ops[2].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[2].op = GRPC_OP_RECV_STATUS_ON_CLIENT; |
|
|
|
ops[2].data.recv_status_on_client.trailing_metadata = |
|
|
|
ops[2].data.recv_status_on_client.trailing_metadata = |
|
|
@ -651,6 +668,7 @@ grpcsharp_call_start_duplex_streaming(grpc_call *call, |
|
|
|
ops[2].data.recv_status_on_client.status_details_capacity = |
|
|
|
ops[2].data.recv_status_on_client.status_details_capacity = |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
&(ctx->recv_status_on_client.status_details_capacity); |
|
|
|
ops[2].flags = 0; |
|
|
|
ops[2].flags = 0; |
|
|
|
|
|
|
|
ops[2].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
@ -668,10 +686,12 @@ grpcsharp_call_send_message(grpc_call *call, grpcsharp_batch_context *ctx, |
|
|
|
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); |
|
|
|
ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); |
|
|
|
ops[0].data.send_message = ctx->send_message; |
|
|
|
ops[0].data.send_message = ctx->send_message; |
|
|
|
ops[0].flags = write_flags; |
|
|
|
ops[0].flags = write_flags; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
ops[1].op = GRPC_OP_SEND_INITIAL_METADATA; |
|
|
|
ops[1].op = GRPC_OP_SEND_INITIAL_METADATA; |
|
|
|
ops[1].data.send_initial_metadata.count = 0; |
|
|
|
ops[1].data.send_initial_metadata.count = 0; |
|
|
|
ops[1].data.send_initial_metadata.metadata = NULL; |
|
|
|
ops[1].data.send_initial_metadata.metadata = NULL; |
|
|
|
ops[1].flags = 0; |
|
|
|
ops[1].flags = 0; |
|
|
|
|
|
|
|
ops[1].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, nops, ctx, NULL); |
|
|
|
return grpc_call_start_batch(call, ops, nops, ctx, NULL); |
|
|
|
} |
|
|
|
} |
|
|
@ -683,6 +703,7 @@ grpcsharp_call_send_close_from_client(grpc_call *call, |
|
|
|
grpc_op ops[1]; |
|
|
|
grpc_op ops[1]; |
|
|
|
ops[0].op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; |
|
|
|
ops[0].op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
@ -706,10 +727,12 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( |
|
|
|
ops[0].data.send_status_from_server.trailing_metadata = |
|
|
|
ops[0].data.send_status_from_server.trailing_metadata = |
|
|
|
ctx->send_status_from_server.trailing_metadata.metadata; |
|
|
|
ctx->send_status_from_server.trailing_metadata.metadata; |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
ops[1].op = GRPC_OP_SEND_INITIAL_METADATA; |
|
|
|
ops[1].op = GRPC_OP_SEND_INITIAL_METADATA; |
|
|
|
ops[1].data.send_initial_metadata.count = 0; |
|
|
|
ops[1].data.send_initial_metadata.count = 0; |
|
|
|
ops[1].data.send_initial_metadata.metadata = NULL; |
|
|
|
ops[1].data.send_initial_metadata.metadata = NULL; |
|
|
|
ops[1].flags = 0; |
|
|
|
ops[1].flags = 0; |
|
|
|
|
|
|
|
ops[1].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, nops, ctx, NULL); |
|
|
|
return grpc_call_start_batch(call, ops, nops, ctx, NULL); |
|
|
|
} |
|
|
|
} |
|
|
@ -721,6 +744,7 @@ grpcsharp_call_recv_message(grpc_call *call, grpcsharp_batch_context *ctx) { |
|
|
|
ops[0].op = GRPC_OP_RECV_MESSAGE; |
|
|
|
ops[0].op = GRPC_OP_RECV_MESSAGE; |
|
|
|
ops[0].data.recv_message = &(ctx->recv_message); |
|
|
|
ops[0].data.recv_message = &(ctx->recv_message); |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
|
} |
|
|
|
} |
|
|
@ -733,6 +757,7 @@ grpcsharp_call_start_serverside(grpc_call *call, grpcsharp_batch_context *ctx) { |
|
|
|
ops[0].data.recv_close_on_server.cancelled = |
|
|
|
ops[0].data.recv_close_on_server.cancelled = |
|
|
|
(&ctx->recv_close_on_server_cancelled); |
|
|
|
(&ctx->recv_close_on_server_cancelled); |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
@ -751,6 +776,7 @@ grpcsharp_call_send_initial_metadata(grpc_call *call, |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ops[0].data.send_initial_metadata.metadata = |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ctx->send_initial_metadata.metadata; |
|
|
|
ops[0].flags = 0; |
|
|
|
ops[0].flags = 0; |
|
|
|
|
|
|
|
ops[0].reserved = NULL; |
|
|
|
|
|
|
|
|
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
return grpc_call_start_batch(call, ops, sizeof(ops) / sizeof(ops[0]), ctx, |
|
|
|
NULL); |
|
|
|
NULL); |
|
|
|