diff options
Diffstat (limited to 'doc/microhttpd.texi')
-rw-r--r-- | doc/microhttpd.texi | 183 |
1 files changed, 112 insertions, 71 deletions
diff --git a/doc/microhttpd.texi b/doc/microhttpd.texi index 71c814f0..66b728aa 100644 --- a/doc/microhttpd.texi +++ b/doc/microhttpd.texi | |||
@@ -113,7 +113,7 @@ GNU libmicrohttpd is a GNU package. | |||
113 | * microhttpd-responses:: Building responses to requests. | 113 | * microhttpd-responses:: Building responses to requests. |
114 | * microhttpd-dauth:: Utilizing Authentication. | 114 | * microhttpd-dauth:: Utilizing Authentication. |
115 | * microhttpd-post:: Adding a @code{POST} processor. | 115 | * microhttpd-post:: Adding a @code{POST} processor. |
116 | * microhttpd-info:: Obtaining status information. | 116 | * microhttpd-info:: Obtaining and modifying status information. |
117 | 117 | ||
118 | Appendices | 118 | Appendices |
119 | 119 | ||
@@ -706,73 +706,6 @@ own private copy of the data for processing. | |||
706 | @end deftp | 706 | @end deftp |
707 | 707 | ||
708 | 708 | ||
709 | @deftp {Enumeration} MHD_ConnectionInfoType | ||
710 | Values of this enum are used to specify what information about a | ||
711 | connection is desired. | ||
712 | |||
713 | @table @code | ||
714 | |||
715 | @item MHD_CONNECTION_INFO_CIPHER_ALGO | ||
716 | What cipher algorithm is being used (HTTPS connections only). | ||
717 | Takes no extra arguments. | ||
718 | NULL is returned for non-HTTPS connections. | ||
719 | |||
720 | @item MHD_CONNECTION_INFO_PROTOCOL, | ||
721 | Takes no extra arguments. Allows finding out the TLS/SSL protocol used | ||
722 | (HTTPS connections only). | ||
723 | NULL is returned for non-HTTPS connections. | ||
724 | |||
725 | @item MHD_CONNECTION_INFO_CLIENT_ADDRESS | ||
726 | Returns information about the address of the client. Returns | ||
727 | essentially a @code{struct sockaddr **} (since the API returns | ||
728 | a @code{union MHD_ConnectionInfo *} and that union contains | ||
729 | a @code{struct sockaddr *}). | ||
730 | |||
731 | @item MHD_CONNECTION_INFO_GNUTLS_SESSION, | ||
732 | Takes no extra arguments. Allows access to the underlying GNUtls session, | ||
733 | including access to the underlying GNUtls client certificate | ||
734 | (HTTPS connections only). Takes no extra arguments. | ||
735 | NULL is returned for non-HTTPS connections. | ||
736 | |||
737 | @item MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT, | ||
738 | Dysfunctional (never implemented, deprecated). Use | ||
739 | MHD_CONNECTION_INFO_GNUTLS_SESSION to get the @code{gnutls_session_t} | ||
740 | and then call @code{gnutls_certificate_get_peers()}. | ||
741 | |||
742 | @item MHD_CONNECTION_INFO_DAEMON | ||
743 | Returns information about @code{struct MHD_Daemon} which manages | ||
744 | this connection. | ||
745 | |||
746 | @end table | ||
747 | @end deftp | ||
748 | |||
749 | |||
750 | |||
751 | |||
752 | @deftp {Enumeration} MHD_DaemonInfoType | ||
753 | Values of this enum are used to specify what | ||
754 | information about a daemon is desired. | ||
755 | @table @code | ||
756 | @item MHD_DAEMON_INFO_KEY_SIZE | ||
757 | Request information about the key size for a particular cipher | ||
758 | algorithm. The cipher algorithm should be passed as an extra argument | ||
759 | (of type 'enum MHD_GNUTLS_CipherAlgorithm'). | ||
760 | |||
761 | @item MHD_DAEMON_INFO_MAC_KEY_SIZE | ||
762 | Request information about the key size for a particular cipher | ||
763 | algorithm. The cipher algorithm should be passed as an extra argument | ||
764 | (of type 'enum MHD_GNUTLS_HashAlgorithm'). | ||
765 | |||
766 | @item MHD_DAEMON_INFO_LISTEN_FD | ||
767 | @cindex listen | ||
768 | Request the file-descriptor number that MHD is using to listen to the | ||
769 | server socket. This can be useful if no port | ||
770 | was specified and a client needs to learn what port | ||
771 | is actually being used by MHD. | ||
772 | No extra arguments should be passed. | ||
773 | |||
774 | @end table | ||
775 | @end deftp | ||
776 | 709 | ||
777 | 710 | ||
778 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 711 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
@@ -1394,8 +1327,6 @@ Return @mynull{} on error (i.e. invalid arguments, out of memory). | |||
1394 | @deftypefun {struct MHD_Response *} MHD_create_response_from_fd (uint64_t size, int fd) | 1327 | @deftypefun {struct MHD_Response *} MHD_create_response_from_fd (uint64_t size, int fd) |
1395 | Create a response object. The response object can be extended with | 1328 | Create a response object. The response object can be extended with |
1396 | header information and then it can be used any number of times. | 1329 | header information and then it can be used any number of times. |
1397 | Function is deprecated, use @code{MHD_create_response_from_fd_at_offset} | ||
1398 | instead (with an offset of zero). | ||
1399 | 1330 | ||
1400 | @table @var | 1331 | @table @var |
1401 | @item size | 1332 | @item size |
@@ -1942,12 +1873,13 @@ of this function. | |||
1942 | 1873 | ||
1943 | @c ------------------------------------------------------------ | 1874 | @c ------------------------------------------------------------ |
1944 | @node microhttpd-info | 1875 | @node microhttpd-info |
1945 | @chapter Obtaining status information. | 1876 | @chapter Obtaining and modifying status information. |
1946 | 1877 | ||
1947 | 1878 | ||
1948 | @menu | 1879 | @menu |
1949 | * microhttpd-info daemon:: State information about an MHD daemon | 1880 | * microhttpd-info daemon:: State information about an MHD daemon |
1950 | * microhttpd-info conn:: State information about a connection | 1881 | * microhttpd-info conn:: State information about a connection |
1882 | * microhttpd-option conn:: Modify per-connection options | ||
1951 | @end menu | 1883 | @end menu |
1952 | 1884 | ||
1953 | 1885 | ||
@@ -1977,6 +1909,34 @@ in case the desired information is not available or | |||
1977 | applicable. | 1909 | applicable. |
1978 | @end deftypefun | 1910 | @end deftypefun |
1979 | 1911 | ||
1912 | |||
1913 | @deftp {Enumeration} MHD_DaemonInfoType | ||
1914 | Values of this enum are used to specify what | ||
1915 | information about a daemon is desired. | ||
1916 | @table @code | ||
1917 | @item MHD_DAEMON_INFO_KEY_SIZE | ||
1918 | Request information about the key size for a particular cipher | ||
1919 | algorithm. The cipher algorithm should be passed as an extra argument | ||
1920 | (of type 'enum MHD_GNUTLS_CipherAlgorithm'). | ||
1921 | |||
1922 | @item MHD_DAEMON_INFO_MAC_KEY_SIZE | ||
1923 | Request information about the key size for a particular cipher | ||
1924 | algorithm. The cipher algorithm should be passed as an extra argument | ||
1925 | (of type 'enum MHD_GNUTLS_HashAlgorithm'). | ||
1926 | |||
1927 | @item MHD_DAEMON_INFO_LISTEN_FD | ||
1928 | @cindex listen | ||
1929 | Request the file-descriptor number that MHD is using to listen to the | ||
1930 | server socket. This can be useful if no port | ||
1931 | was specified and a client needs to learn what port | ||
1932 | is actually being used by MHD. | ||
1933 | No extra arguments should be passed. | ||
1934 | |||
1935 | @end table | ||
1936 | @end deftp | ||
1937 | |||
1938 | |||
1939 | |||
1980 | @c ------------------------------------------------------------ | 1940 | @c ------------------------------------------------------------ |
1981 | @node microhttpd-info conn | 1941 | @node microhttpd-info conn |
1982 | @section Obtaining state information about a connection | 1942 | @section Obtaining state information about a connection |
@@ -2003,6 +1963,87 @@ in case the desired information is not available or | |||
2003 | applicable. | 1963 | applicable. |
2004 | @end deftypefun | 1964 | @end deftypefun |
2005 | 1965 | ||
1966 | @deftp {Enumeration} MHD_ConnectionInfoType | ||
1967 | Values of this enum are used to specify what information about a | ||
1968 | connection is desired. | ||
1969 | |||
1970 | @table @code | ||
1971 | |||
1972 | @item MHD_CONNECTION_INFO_CIPHER_ALGO | ||
1973 | What cipher algorithm is being used (HTTPS connections only). | ||
1974 | Takes no extra arguments. | ||
1975 | NULL is returned for non-HTTPS connections. | ||
1976 | |||
1977 | @item MHD_CONNECTION_INFO_PROTOCOL, | ||
1978 | Takes no extra arguments. Allows finding out the TLS/SSL protocol used | ||
1979 | (HTTPS connections only). | ||
1980 | NULL is returned for non-HTTPS connections. | ||
1981 | |||
1982 | @item MHD_CONNECTION_INFO_CLIENT_ADDRESS | ||
1983 | Returns information about the address of the client. Returns | ||
1984 | essentially a @code{struct sockaddr **} (since the API returns | ||
1985 | a @code{union MHD_ConnectionInfo *} and that union contains | ||
1986 | a @code{struct sockaddr *}). | ||
1987 | |||
1988 | @item MHD_CONNECTION_INFO_GNUTLS_SESSION, | ||
1989 | Takes no extra arguments. Allows access to the underlying GNUtls session, | ||
1990 | including access to the underlying GNUtls client certificate | ||
1991 | (HTTPS connections only). Takes no extra arguments. | ||
1992 | NULL is returned for non-HTTPS connections. | ||
1993 | |||
1994 | @item MHD_CONNECTION_INFO_GNUTLS_CLIENT_CERT, | ||
1995 | Dysfunctional (never implemented, deprecated). Use | ||
1996 | MHD_CONNECTION_INFO_GNUTLS_SESSION to get the @code{gnutls_session_t} | ||
1997 | and then call @code{gnutls_certificate_get_peers()}. | ||
1998 | |||
1999 | @item MHD_CONNECTION_INFO_DAEMON | ||
2000 | Returns information about @code{struct MHD_Daemon} which manages | ||
2001 | this connection. | ||
2002 | |||
2003 | @end table | ||
2004 | @end deftp | ||
2005 | |||
2006 | |||
2007 | |||
2008 | @c ------------------------------------------------------------ | ||
2009 | @node microhttpd-option conn | ||
2010 | @section Setting custom options for an individual connection | ||
2011 | @cindex timeout | ||
2012 | |||
2013 | |||
2014 | |||
2015 | @deftypefun {int} MHD_set_connection_option (struct MHD_Connection *daemon, enum MHD_CONNECTION_OPTION option, ...) | ||
2016 | Set a custom option for the given connection. | ||
2017 | |||
2018 | @table @var | ||
2019 | @item connection | ||
2020 | the connection for which an option should be set or modified; | ||
2021 | |||
2022 | @item option | ||
2023 | option to set | ||
2024 | |||
2025 | @item ... | ||
2026 | additional arguments for the option (depending on option) | ||
2027 | @end table | ||
2028 | |||
2029 | Returns @code{MHD_YES} on success, @code{MHD_NO} for errors | ||
2030 | (i.e. option argument invalid or option unknown). | ||
2031 | @end deftypefun | ||
2032 | |||
2033 | |||
2034 | @deftp {Enumeration} MHD_CONNECTION_OPTION | ||
2035 | Values of this enum are used to specify which option for a | ||
2036 | connection should be changed. | ||
2037 | |||
2038 | @table @code | ||
2039 | |||
2040 | @item MHD_CONNECTION_OPTION_TIMEOUT | ||
2041 | Set a custom timeout for the given connection. Specified | ||
2042 | as the number of seconds, given as an @code{unsigned int}. Use | ||
2043 | zero for no timeout. | ||
2044 | |||
2045 | @end table | ||
2046 | @end deftp | ||
2006 | 2047 | ||
2007 | 2048 | ||
2008 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 2049 | @c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |