diff options
Diffstat (limited to 'src/core/iomgr/udp_server.h')
-rw-r--r-- | src/core/iomgr/udp_server.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/core/iomgr/udp_server.h b/src/core/iomgr/udp_server.h index e37d0485c1..76082d7761 100644 --- a/src/core/iomgr/udp_server.h +++ b/src/core/iomgr/udp_server.h @@ -40,15 +40,16 @@ typedef struct grpc_udp_server grpc_udp_server; /* Called when data is available to read from the socket. */ -typedef void (*grpc_udp_server_read_cb) (int fd); +typedef void (*grpc_udp_server_read_cb)(int fd); /* Create a server, initially not bound to any ports */ -grpc_udp_server *grpc_udp_server_create (void); +grpc_udp_server *grpc_udp_server_create(void); /* Start listening to bound ports */ -void grpc_udp_server_start (grpc_exec_ctx * exec_ctx, grpc_udp_server * udp_server, grpc_pollset ** pollsets, size_t pollset_count); +void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *udp_server, + grpc_pollset **pollsets, size_t pollset_count); -int grpc_udp_server_get_fd (grpc_udp_server * s, unsigned index); +int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); /* Add a port to the server, returning port number on success, or negative on failure. @@ -60,9 +61,11 @@ 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); +int grpc_udp_server_add_port(grpc_udp_server *s, const void *addr, + size_t addr_len, grpc_udp_server_read_cb read_cb); -void grpc_udp_server_destroy (grpc_exec_ctx * exec_ctx, grpc_udp_server * server, grpc_closure * on_done); +void grpc_udp_server_destroy(grpc_exec_ctx *exec_ctx, grpc_udp_server *server, + grpc_closure *on_done); /* Write the contents of buffer to the underlying UDP socket. */ /* |