diff options
author | Robbie Shade <rjshade@google.com> | 2015-07-10 16:10:31 -0400 |
---|---|---|
committer | Robbie Shade <rjshade@google.com> | 2015-07-15 11:36:35 -0400 |
commit | 4cde25cd016c732ff8a508ed3cb9715d818c8a07 (patch) | |
tree | 67633dfd2197954bc7808edfdfec9a8beb8634f4 | |
parent | 4b70e03d002cb7d342de14d88ac11ccc3d162bef (diff) |
grpc_udp_server_write method
-rw-r--r-- | src/core/iomgr/udp_server.c | 9 | ||||
-rw-r--r-- | test/core/iomgr/udp_server_test.c | 2 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/core/iomgr/udp_server.c b/src/core/iomgr/udp_server.c index 261a3c93f6..eecaf27319 100644 --- a/src/core/iomgr/udp_server.c +++ b/src/core/iomgr/udp_server.c @@ -382,17 +382,14 @@ void grpc_udp_server_start(grpc_udp_server *s, grpc_pollset **pollsets, fprintf(stderr, "grpc_udp_server_start Started UDP server\n"); } -/* -void grpc_udp_server_write(server_port *sp, - const char *buffer, - size_t buf_len, - const struct sockaddr* peer_address) { +/* TODO(rjshade): Add a test for this method. */ +void grpc_udp_server_write(server_port *sp, const char *buffer, size_t buf_len, + const struct sockaddr *peer_address) { int rc; rc = sendto(sp->fd, buffer, buf_len, 0, peer_address, sizeof(peer_address)); if (rc < 0) { gpr_log(GPR_ERROR, "Unable to send data: %s", strerror(errno)); } } -*/ #endif diff --git a/test/core/iomgr/udp_server_test.c b/test/core/iomgr/udp_server_test.c index 4a1dfc9652..a7e7873738 100644 --- a/test/core/iomgr/udp_server_test.c +++ b/test/core/iomgr/udp_server_test.c @@ -48,7 +48,7 @@ static grpc_pollset g_pollset; static int g_number_of_reads = 0; -static void on_connect(void *arg, grpc_endpoint *tcp) { +static void on_connect(void *arg, grpc_endpoint *udp) { } static void on_read(int fd, grpc_udp_server_cb new_transport_cb, void *cb_arg) { |