2
0

CURLOPT_ABSTRACT_UNIX_SOCKET.3 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "08 Jan 2017" libcurl libcurl
  26. .SH NAME
  27. CURLOPT_ABSTRACT_UNIX_SOCKET \- abstract Unix domain socket
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET,
  32. char *path);
  33. .fi
  34. .SH DESCRIPTION
  35. Enables the use of an abstract Unix domain socket instead of establishing a
  36. TCP connection to a host. The parameter should be a char * to a
  37. null-terminated string holding the path of the socket. The path will be set to
  38. \fIpath\fP prefixed by a NULL byte (this is the convention for abstract
  39. sockets, however it should be stressed that the path passed to this function
  40. should not contain a leading NULL).
  41. On non-supporting platforms, the abstract address will be interpreted as an
  42. empty string and fail gracefully, generating a runtime error.
  43. This option shares the same semantics as \fICURLOPT_UNIX_SOCKET_PATH(3)\fP in
  44. which documentation more details can be found. Internally, these two options
  45. share the same storage and therefore only one of them can be set per handle.
  46. .SH DEFAULT
  47. Default is NULL.
  48. .SH PROTOCOLS
  49. All
  50. .SH EXAMPLE
  51. .nf
  52. curl_easy_setopt(curl_handle, CURLOPT_ABSTRACT_UNIX_SOCKET, "/tmp/foo.sock");
  53. curl_easy_setopt(curl_handle, CURLOPT_URL, "http://localhost/");
  54. .fi
  55. .SH AVAILABILITY
  56. Added in 7.53.0.
  57. .SH RETURN VALUE
  58. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  59. .SH "SEE ALSO"
  60. .BR CURLOPT_UNIX_SOCKET_PATH "(3), " unix "(7), "