diff options
author | David Garcia Quintas <dgq@google.com> | 2016-05-12 14:28:36 -0700 |
---|---|---|
committer | David Garcia Quintas <dgq@google.com> | 2016-05-12 14:28:36 -0700 |
commit | 6d0b4d20c0dbb9326724343a0c04b52d390e25a4 (patch) | |
tree | c815c2d33c28f0d10112d8239fcf6fe5d6b250ef /src/core/lib/iomgr/udp_server.h | |
parent | d9c58961f91d877e760008e2916527b0d56b8826 (diff) | |
parent | a709afe241d8b264a1c326315f757b4a8d330207 (diff) |
Merge branch 'master' of github.com:grpc/grpc into merge
Diffstat (limited to 'src/core/lib/iomgr/udp_server.h')
-rw-r--r-- | src/core/lib/iomgr/udp_server.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/lib/iomgr/udp_server.h b/src/core/lib/iomgr/udp_server.h index d8cf957a22..33c5ce11cd 100644 --- a/src/core/lib/iomgr/udp_server.h +++ b/src/core/lib/iomgr/udp_server.h @@ -48,6 +48,9 @@ typedef struct grpc_udp_server grpc_udp_server; typedef void (*grpc_udp_server_read_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, struct grpc_server *server); +/* Called when the grpc_fd is about to be orphaned (and the FD closed). */ +typedef void (*grpc_udp_server_orphan_cb)(grpc_fd *emfd); + /* Create a server, initially not bound to any ports */ grpc_udp_server *grpc_udp_server_create(void); @@ -69,7 +72,8 @@ int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); /* TODO(ctiller): deprecate this, and make grpc_udp_server_add_ports to handle all of the multiple socket port matching logic in one place */ int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, - size_t addr_len, grpc_udp_server_read_cb read_cb); + size_t addr_len, grpc_udp_server_read_cb read_cb, + grpc_udp_server_orphan_cb orphan_cb); void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server, grpc_closure *on_done); |