From d8cd08bd985b0d4f16f76c6c726b5b938b2ee9ee Mon Sep 17 00:00:00 2001 From: cjihrig Date: Fri, 12 May 2017 13:41:22 -0400 Subject: 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 Reviewed-By: Sam Roberts --- docs/src/misc.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'docs/src') 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 -- cgit v1.2.3