aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/util/port.h
diff options
context:
space:
mode:
authorGravatar Yuchen Zeng <zyc@google.com>2017-08-02 16:09:08 -0700
committerGravatar Yuchen Zeng <zyc@google.com>2017-08-02 16:09:08 -0700
commit32c0153f8181feb89e0abf2ef47c02fb63f70063 (patch)
tree23631a8616afa29478e4cb4d88a3caa47acb86e7 /test/core/util/port.h
parente1653dec3e360fd02cd15d87e9cf78f7cb02bfa5 (diff)
Make port picking functions overridable
Diffstat (limited to 'test/core/util/port.h')
-rw-r--r--test/core/util/port.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/core/util/port.h b/test/core/util/port.h
index 154e8f830c..0e15f397a5 100644
--- a/test/core/util/port.h
+++ b/test/core/util/port.h
@@ -25,16 +25,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(void);
+extern 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(void);
+extern 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);
+extern void (*grpc_recycle_unused_port)(int port);
#ifdef __cplusplus
}