Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
8c59791c
Commit
8c59791c
authored
9 years ago
by
Nicolas "Pixel" Noble
Browse files
Options
Downloads
Patches
Plain Diff
Working on C#.
parent
8e6bab5e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csharp/ext/grpc_csharp_ext.c
+28
-18
28 additions, 18 deletions
src/csharp/ext/grpc_csharp_ext.c
with
28 additions
and
18 deletions
src/csharp/ext/grpc_csharp_ext.c
+
28
−
18
View file @
8c59791c
...
...
@@ -340,7 +340,7 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_shutdown(void) { grpc_shutdown(); }
GPR_EXPORT
grpc_completion_queue
*
GPR_CALLTYPE
grpcsharp_completion_queue_create
(
void
)
{
return
grpc_completion_queue_create
();
return
grpc_completion_queue_create
(
NULL
);
}
GPR_EXPORT
void
GPR_CALLTYPE
...
...
@@ -355,20 +355,21 @@ grpcsharp_completion_queue_destroy(grpc_completion_queue *cq) {
GPR_EXPORT
grpc_event
GPR_CALLTYPE
grpcsharp_completion_queue_next
(
grpc_completion_queue
*
cq
)
{
return
grpc_completion_queue_next
(
cq
,
gpr_inf_future
(
GPR_CLOCK_REALTIME
));
return
grpc_completion_queue_next
(
cq
,
gpr_inf_future
(
GPR_CLOCK_REALTIME
),
NULL
);
}
GPR_EXPORT
grpc_event
GPR_CALLTYPE
grpcsharp_completion_queue_pluck
(
grpc_completion_queue
*
cq
,
void
*
tag
)
{
return
grpc_completion_queue_pluck
(
cq
,
tag
,
gpr_inf_future
(
GPR_CLOCK_REALTIME
));
gpr_inf_future
(
GPR_CLOCK_REALTIME
)
,
NULL
);
}
/* Channel */
GPR_EXPORT
grpc_channel
*
GPR_CALLTYPE
grpcsharp_channel_create
(
const
char
*
target
,
const
grpc_channel_args
*
args
)
{
return
grpc_channel_create
(
target
,
args
);
return
grpc_channel_create
(
target
,
args
,
NULL
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_channel_destroy
(
grpc_channel
*
channel
)
{
...
...
@@ -379,7 +380,7 @@ GPR_EXPORT grpc_call *GPR_CALLTYPE
grpcsharp_channel_create_call
(
grpc_channel
*
channel
,
grpc_completion_queue
*
cq
,
const
char
*
method
,
const
char
*
host
,
gpr_timespec
deadline
)
{
return
grpc_channel_create_call
(
channel
,
cq
,
method
,
host
,
deadline
);
return
grpc_channel_create_call
(
channel
,
cq
,
method
,
host
,
deadline
,
NULL
);
}
/* Channel args */
...
...
@@ -446,13 +447,13 @@ GPR_EXPORT gpr_int32 GPR_CALLTYPE gprsharp_sizeof_timespec(void) {
/* Call */
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_cancel
(
grpc_call
*
call
)
{
return
grpc_call_cancel
(
call
);
return
grpc_call_cancel
(
call
,
NULL
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_cancel_with_status
(
grpc_call
*
call
,
grpc_status_code
status
,
const
char
*
description
)
{
return
grpc_call_cancel_with_status
(
call
,
status
,
description
);
return
grpc_call_cancel_with_status
(
call
,
status
,
description
,
NULL
);
}
GPR_EXPORT
void
GPR_CALLTYPE
grpcsharp_call_destroy
(
grpc_call
*
call
)
{
...
...
@@ -501,7 +502,8 @@ grpcsharp_call_start_unary(grpc_call *call, grpcsharp_batch_context *ctx,
&
(
ctx
->
recv_status_on_client
.
status_details_capacity
);
ops
[
5
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
...
...
@@ -538,7 +540,8 @@ grpcsharp_call_start_client_streaming(grpc_call *call,
&
(
ctx
->
recv_status_on_client
.
status_details_capacity
);
ops
[
3
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
grpcsharp_call_start_server_streaming
(
...
...
@@ -578,7 +581,8 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming(
&
(
ctx
->
recv_status_on_client
.
status_details_capacity
);
ops
[
4
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
...
...
@@ -611,7 +615,8 @@ grpcsharp_call_start_duplex_streaming(grpc_call *call,
&
(
ctx
->
recv_status_on_client
.
status_details_capacity
);
ops
[
2
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
...
...
@@ -624,7 +629,8 @@ grpcsharp_call_send_message(grpc_call *call, grpcsharp_batch_context *ctx,
ops
[
0
].
data
.
send_message
=
ctx
->
send_message
;
ops
[
0
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
...
...
@@ -635,7 +641,8 @@ grpcsharp_call_send_close_from_client(grpc_call *call,
ops
[
0
].
op
=
GRPC_OP_SEND_CLOSE_FROM_CLIENT
;
ops
[
0
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
...
...
@@ -658,7 +665,8 @@ grpcsharp_call_send_status_from_server(grpc_call *call,
ctx
->
send_status_from_server
.
trailing_metadata
.
metadata
;
ops
[
0
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
...
...
@@ -668,7 +676,8 @@ grpcsharp_call_recv_message(grpc_call *call, grpcsharp_batch_context *ctx) {
ops
[
0
].
op
=
GRPC_OP_RECV_MESSAGE
;
ops
[
0
].
data
.
recv_message
=
&
(
ctx
->
recv_message
);
ops
[
0
].
flags
=
0
;
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
);
}
GPR_EXPORT
grpc_call_error
GPR_CALLTYPE
...
...
@@ -685,7 +694,8 @@ grpcsharp_call_start_serverside(grpc_call *call, grpcsharp_batch_context *ctx) {
(
&
ctx
->
recv_close_on_server_cancelled
);
ops
[
1
].
flags
=
0
;
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
);
}
/* Server */
...
...
@@ -693,8 +703,8 @@ grpcsharp_call_start_serverside(grpc_call *call, grpcsharp_batch_context *ctx) {
GPR_EXPORT
grpc_server
*
GPR_CALLTYPE
grpcsharp_server_create
(
grpc_completion_queue
*
cq
,
const
grpc_channel_args
*
args
)
{
grpc_server
*
server
=
grpc_server_create
(
args
);
grpc_server_register_completion_queue
(
server
,
cq
);
grpc_server
*
server
=
grpc_server_create
(
args
,
NULL
);
grpc_server_register_completion_queue
(
server
,
cq
,
NULL
);
return
server
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment