aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/util/port.h
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-17 09:17:29 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-17 09:17:29 -0700
commitc6545548745ddaa619ae720ed4f3def6010ef00b (patch)
tree344cf1233c64f4ed69b815d746941b01ae0ef19f /test/core/util/port.h
parentd6a5b803f46a91987bccd8eb4fca14d9127daf9c (diff)
parent8010daaf2b0c0308b0838c555535d4efa6e361bc (diff)
Merge github.com:grpc/grpc into error
Diffstat (limited to 'test/core/util/port.h')
-rw-r--r--test/core/util/port.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/core/util/port.h b/test/core/util/port.h
index 93788bcab2..faeabbae9b 100644
--- a/test/core/util/port.h
+++ b/test/core/util/port.h
@@ -40,10 +40,16 @@ extern "C" {
/* pick a port number that is currently unused by either tcp or udp. return
0 on failure. */
-int grpc_pick_unused_port();
+int grpc_pick_unused_port(void);
/* pick a port number that is currently unused by either tcp or udp. abort
on failure. */
-int grpc_pick_unused_port_or_die();
+int grpc_pick_unused_port_or_die(void);
+
+/* Return a port which was previously returned by grpc_pick_unused_port().
+ * Implementations of grpc_pick_unused_port() backed by a portserver may limit
+ * the total number of ports available; this lets a binary return its allocated
+ * ports back to the server if it is going to allocate a large number. */
+void grpc_recycle_unused_port(int port);
#ifdef __cplusplus
}