aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc/support/host_port.h
diff options
context:
space:
mode:
authorGravatar Nicolas "Pixel" Noble <nicolas@nobis-crew.org>2015-02-20 22:58:54 -0800
committerGravatar Nicolas "Pixel" Noble <nicolas@nobis-crew.org>2015-02-20 22:59:49 -0800
commit589cba2c7bb038afe9666c10b7d4c75af18a5527 (patch)
tree2775e71644e2b7580cdb8467d505662ddb8fc39b /include/grpc/support/host_port.h
parentc6d8f5a3aecc5e8812e9bedbf3107727fa561b11 (diff)
Factorizing out function split_host_port.
Diffstat (limited to 'include/grpc/support/host_port.h')
-rw-r--r--include/grpc/support/host_port.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/grpc/support/host_port.h b/include/grpc/support/host_port.h
index 362046cb95..2dac38a157 100644
--- a/include/grpc/support/host_port.h
+++ b/include/grpc/support/host_port.h
@@ -50,6 +50,11 @@ extern "C" {
In the unlikely event of an error, returns -1 and sets *out to NULL. */
int gpr_join_host_port(char **out, const char *host, int port);
+/* Given a name in the form "host:port" or "[ho:st]:port", split into hostname
+ and port number, into newly allocated strings, which must later be
+ destroyed using gpr_free(). */
+void gpr_split_host_port(const char *name, char **host, char **port);
+
#ifdef __cplusplus
}
#endif