diff options
author | allen <leloucharcher@163.com> | 2019-10-10 19:43:17 +0800 |
---|---|---|
committer | allen <leloucharcher@163.com> | 2019-10-10 19:43:17 +0800 |
commit | a585a2778e0540e7e2514796c42da8287a77e190 (patch) | |
tree | b3c243b5169951ad2812d818d6588bbf0052b55a /doc | |
parent | 672b6df4743dbf76e059c640ad3fe45f7c795594 (diff) | |
download | jansson-a585a2778e0540e7e2514796c42da8287a77e190.zip jansson-a585a2778e0540e7e2514796c42da8287a77e190.tar.gz jansson-a585a2778e0540e7e2514796c42da8287a77e190.tar.bz2 |
add note for non-blocking file descriptor used for json_loadfd
Diffstat (limited to 'doc')
-rw-r--r-- | doc/apiref.rst | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/doc/apiref.rst b/doc/apiref.rst index 3c4fa47..cdd2058 100644 --- a/doc/apiref.rst +++ b/doc/apiref.rst @@ -1333,7 +1333,11 @@ If no error or position information is needed, you can pass *NULL*. It is important to note that this function can only succeed on stream file descriptors (such as SOCK_STREAM). Using this function on a non-stream file descriptor will result in undefined behavior. For - non-stream file descriptors, see instead :func:`json_loadb()`. + non-stream file descriptors, see instead :func:`json_loadb()`.In + addition, please also note that this function cannot be used on + non-blocking file descriptors (such as non-blocking socket). Using + this function on non-blocking file descriptors has a high risk of + data loss because it does not support resuming. This function requires POSIX and fails on all non-POSIX systems. |