|
|
@ -37,15 +37,16 @@ |
|
|
|
#include "src/core/iomgr/endpoint.h" |
|
|
|
#include "src/core/iomgr/endpoint.h" |
|
|
|
#include "src/core/iomgr/fd_posix.h" |
|
|
|
#include "src/core/iomgr/fd_posix.h" |
|
|
|
|
|
|
|
|
|
|
|
/* Forward decl of grpc_server */ |
|
|
|
/* Forward decl of struct grpc_server */ |
|
|
|
typedef struct grpc_server grpc_server; |
|
|
|
/* This is not typedef'ed to avoid a typedef-redefinition error */ |
|
|
|
|
|
|
|
struct grpc_server; |
|
|
|
|
|
|
|
|
|
|
|
/* Forward decl of grpc_udp_server */ |
|
|
|
/* Forward decl of grpc_udp_server */ |
|
|
|
typedef struct grpc_udp_server grpc_udp_server; |
|
|
|
typedef struct grpc_udp_server grpc_udp_server; |
|
|
|
|
|
|
|
|
|
|
|
/* Called when data is available to read from the socket. */ |
|
|
|
/* Called when data is available to read from the socket. */ |
|
|
|
typedef void (*grpc_udp_server_read_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, |
|
|
|
typedef void (*grpc_udp_server_read_cb)(grpc_exec_ctx *exec_ctx, grpc_fd *emfd, |
|
|
|
grpc_server *server); |
|
|
|
struct grpc_server *server); |
|
|
|
|
|
|
|
|
|
|
|
/* Create a server, initially not bound to any ports */ |
|
|
|
/* 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); |
|
|
@ -53,7 +54,7 @@ grpc_udp_server *grpc_udp_server_create(void); |
|
|
|
/* Start listening to bound ports */ |
|
|
|
/* Start listening to bound ports */ |
|
|
|
void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *udp_server, |
|
|
|
void grpc_udp_server_start(grpc_exec_ctx *exec_ctx, grpc_udp_server *udp_server, |
|
|
|
grpc_pollset **pollsets, size_t pollset_count, |
|
|
|
grpc_pollset **pollsets, size_t pollset_count, |
|
|
|
grpc_server *server); |
|
|
|
struct grpc_server *server); |
|
|
|
|
|
|
|
|
|
|
|
int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); |
|
|
|
int grpc_udp_server_get_fd(grpc_udp_server *s, unsigned index); |
|
|
|
|
|
|
|
|
|
|
|