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
a7f52c51
Commit
a7f52c51
authored
9 years ago
by
Craig Tiller
Browse files
Options
Downloads
Plain Diff
Merge pull request #5017 from daniel-j-born/tcp_server_trivial
Fix comments in tcp_server.h
parents
b59b1427
96d9dc34
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/core/iomgr/tcp_server.h
+5
-6
5 additions, 6 deletions
src/core/iomgr/tcp_server.h
with
5 additions
and
6 deletions
src/core/iomgr/tcp_server.h
+
5
−
6
View file @
a7f52c51
...
@@ -40,15 +40,14 @@
...
@@ -40,15 +40,14 @@
/* Forward decl of grpc_tcp_server */
/* Forward decl of grpc_tcp_server */
typedef
struct
grpc_tcp_server
grpc_tcp_server
;
typedef
struct
grpc_tcp_server
grpc_tcp_server
;
typedef
struct
grpc_tcp_server_acceptor
grpc_tcp_server_acceptor
;
typedef
struct
grpc_tcp_server_acceptor
{
struct
grpc_tcp_server_acceptor
{
/* grpc_tcp_server_cb functions share a ref on from_server that is valid
/* grpc_tcp_server_cb functions share a ref on from_server that is valid
until the function returns. */
until the function returns. */
grpc_tcp_server
*
from_server
;
grpc_tcp_server
*
from_server
;
/* Indices that may be passed to grpc_tcp_server_port_fd(). */
/* Indices that may be passed to grpc_tcp_server_port_fd(). */
unsigned
port_index
;
unsigned
port_index
;
unsigned
fd_index
;
unsigned
fd_index
;
};
}
grpc_tcp_server_acceptor
;
/* Called for newly connected TCP connections. */
/* Called for newly connected TCP connections. */
typedef
void
(
*
grpc_tcp_server_cb
)(
grpc_exec_ctx
*
exec_ctx
,
void
*
arg
,
typedef
void
(
*
grpc_tcp_server_cb
)(
grpc_exec_ctx
*
exec_ctx
,
void
*
arg
,
...
@@ -57,7 +56,7 @@ typedef void (*grpc_tcp_server_cb)(grpc_exec_ctx *exec_ctx, void *arg,
...
@@ -57,7 +56,7 @@ typedef void (*grpc_tcp_server_cb)(grpc_exec_ctx *exec_ctx, void *arg,
/* Create a server, initially not bound to any ports. The caller owns one ref.
/* Create a server, initially not bound to any ports. The caller owns one ref.
If shutdown_complete is not NULL, it will be used by
If shutdown_complete is not NULL, it will be used by
grpc_tcp_server_unref(). */
grpc_tcp_server_unref()
when the ref count reaches zero
. */
grpc_tcp_server
*
grpc_tcp_server_create
(
grpc_closure
*
shutdown_complete
);
grpc_tcp_server
*
grpc_tcp_server_create
(
grpc_closure
*
shutdown_complete
);
/* Start listening to bound ports */
/* Start listening to bound ports */
...
@@ -84,7 +83,7 @@ unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, unsigned port_index);
...
@@ -84,7 +83,7 @@ unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, unsigned port_index);
/* Returns the file descriptor of the Mth (fd_index) listening socket of the Nth
/* Returns the file descriptor of the Mth (fd_index) listening socket of the Nth
(port_index) call to add_port() on this server, or -1 if the indices are out
(port_index) call to add_port() on this server, or -1 if the indices are out
of bounds. The file descriptor remains owned by the server, and will be
of bounds. The file descriptor remains owned by the server, and will be
cleaned up when
grpc_tcp_server_destroy is called
. */
cleaned up when
the ref count reaches zero
. */
int
grpc_tcp_server_port_fd
(
grpc_tcp_server
*
s
,
unsigned
port_index
,
int
grpc_tcp_server_port_fd
(
grpc_tcp_server
*
s
,
unsigned
port_index
,
unsigned
fd_index
);
unsigned
fd_index
);
...
@@ -97,7 +96,7 @@ grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s);
...
@@ -97,7 +96,7 @@ grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s);
void
grpc_tcp_server_shutdown_starting_add
(
grpc_tcp_server
*
s
,
void
grpc_tcp_server_shutdown_starting_add
(
grpc_tcp_server
*
s
,
grpc_closure
*
shutdown_starting
);
grpc_closure
*
shutdown_starting
);
/* If the recount drops to zero, delete s, and call (exec_ctx==NULL) or enqueue
/* If the re
f
count drops to zero, delete s, and call (exec_ctx==NULL) or enqueue
a call (exec_ctx!=NULL) to shutdown_complete. */
a call (exec_ctx!=NULL) to shutdown_complete. */
void
grpc_tcp_server_unref
(
grpc_exec_ctx
*
exec_ctx
,
grpc_tcp_server
*
s
);
void
grpc_tcp_server_unref
(
grpc_exec_ctx
*
exec_ctx
,
grpc_tcp_server
*
s
);
...
...
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