include: document pipe path truncation behavior
Document the fact that the maximum path length for UNIX domain socket paths is much less than _POSIX_PATH_MAX. For most file systems, _POSIX_PATH_MAX is 1024 or 4096 bytes while `sizeof(sockaddr_un.sun_path)` is typically between 92 and 108 bytes.
This commit is contained in:
parent
20edfc76ad
commit
9ab5ee2f39
12
include/uv.h
12
include/uv.h
@ -1118,8 +1118,20 @@ UV_EXTERN int uv_pipe_init(uv_loop_t*, uv_pipe_t* handle, int ipc);
|
|||||||
*/
|
*/
|
||||||
UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_file file);
|
UV_EXTERN int uv_pipe_open(uv_pipe_t*, uv_file file);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bind the pipe to a file path (UNIX) or a name (Windows.)
|
||||||
|
*
|
||||||
|
* Paths on UNIX get truncated to `sizeof(sockaddr_un.sun_path)` bytes,
|
||||||
|
* typically between 92 and 108 bytes.
|
||||||
|
*/
|
||||||
UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name);
|
UV_EXTERN int uv_pipe_bind(uv_pipe_t* handle, const char* name);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Connect to the UNIX domain socket or the named pipe.
|
||||||
|
*
|
||||||
|
* Paths on UNIX get truncated to `sizeof(sockaddr_un.sun_path)` bytes,
|
||||||
|
* typically between 92 and 108 bytes.
|
||||||
|
*/
|
||||||
UV_EXTERN void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle,
|
UV_EXTERN void uv_pipe_connect(uv_connect_t* req, uv_pipe_t* handle,
|
||||||
const char* name, uv_connect_cb cb);
|
const char* name, uv_connect_cb cb);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user