aboutsummaryrefslogtreecommitdiff
path: root/docs/src/misc.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src/misc.rst')
-rw-r--r--docs/src/misc.rst11
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