diff options
author | cjihrig <cjihrig@gmail.com> | 2017-05-12 13:41:22 -0400 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-05-18 10:27:47 -0400 |
commit | d8cd08bd985b0d4f16f76c6c726b5b938b2ee9ee (patch) | |
tree | 874a0b00f298b435d81d629120ac164360aaf618 /docs/src | |
parent | 4d0054145d19ac654976ddf9476756c67481ff2a (diff) | |
download | libuv-d8cd08bd985b0d4f16f76c6c726b5b938b2ee9ee.tar.gz libuv-d8cd08bd985b0d4f16f76c6c726b5b938b2ee9ee.zip |
unix,win: add uv_os_gethostname()
Fixes: https://github.com/libuv/libuv/issues/1315
PR-URL: https://github.com/libuv/libuv/pull/1342
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/misc.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/docs/src/misc.rst b/docs/src/misc.rst index a92b74f4..9d7c3617 100644 --- a/docs/src/misc.rst +++ b/docs/src/misc.rst @@ -429,3 +429,14 @@ API This function is not thread safe. .. versionadded:: 1.12.0 + +.. c:function:: int uv_os_gethostname(char* buffer, size_t* size) + + Returns the hostname as a null-terminated string in `buffer`, and sets + `size` to the string length of the hostname. When calling this function, + `size` must be set to the amount of storage available in `buffer`, including + the null terminator. If the hostname exceeds the storage available in + `buffer`, `UV_ENOBUFS` is returned, and `size` is set to the amount of + storage required to hold the value. + + .. versionadded:: 1.12.0 |