aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/microhttpd-tutorial.texi4
-rw-r--r--doc/microhttpd.texi32
2 files changed, 33 insertions, 3 deletions
diff --git a/doc/microhttpd-tutorial.texi b/doc/microhttpd-tutorial.texi
index b4f19a34..020b1e2a 100644
--- a/doc/microhttpd-tutorial.texi
+++ b/doc/microhttpd-tutorial.texi
@@ -3,8 +3,8 @@
3@setfilename microhttpd-tutorial.info 3@setfilename microhttpd-tutorial.info
4@set UPDATED 28 Feb 2010 4@set UPDATED 28 Feb 2010
5@set UPDATED-MONTH Feb 2010 5@set UPDATED-MONTH Feb 2010
6@set EDITION 0.9.7 6@set EDITION 0.9.8
7@set VERSION 0.9.7 7@set VERSION 0.9.8
8@settitle A tutorial for GNU libmicrohttpd 8@settitle A tutorial for GNU libmicrohttpd
9 9
10@dircategory GNU Libraries 10@dircategory GNU Libraries
diff --git a/doc/microhttpd.texi b/doc/microhttpd.texi
index 86ed2481..ab8c5c9e 100644
--- a/doc/microhttpd.texi
+++ b/doc/microhttpd.texi
@@ -9,7 +9,7 @@ header file @file{microhttpd.h}.
9 9
10@noindent 10@noindent
11 11
12Copyright @copyright{} 2007, 2008, 2009, 2010 Christian Grothoff 12Copyright @copyright{} 2007, 2008, 2009, 2010, 2011 Christian Grothoff
13 13
14@quotation 14@quotation
15Permission is granted to copy, distribute and/or modify this document 15Permission is granted to copy, distribute and/or modify this document
@@ -1100,6 +1100,36 @@ started with the right options for this call.
1100@end deftypefun 1100@end deftypefun
1101 1101
1102 1102
1103@deftypefun void MHD_add_connection (struct MHD_Daemon *daemon, int client_socket, const struct sockaddr *addr, socklen_t addrlen)
1104Add another client connection to the set of connections
1105managed by MHD. This API is usually not needed (since
1106MHD will accept inbound connections on the server socket).
1107Use this API in special cases, for example if your HTTP
1108server is behind NAT and needs to connect out to the
1109HTTP client.
1110
1111The given client socket will be managed (and closed!) by MHD after
1112this call and must no longer be used directly by the application
1113afterwards.
1114
1115@table @var
1116@item daemon
1117daemon that manages the connection
1118@item client_socket
1119socket to manage (MHD will expect to receive an HTTP request from this socket next).
1120@item addr
1121IP address of the client
1122@item addrlen
1123number of bytes in addr
1124@end table
1125
1126This function will return @code{MHD_YES} on success,
1127@code{MHD_NO} if this daemon could
1128not handle the connection (i.e. malloc failed, etc).
1129The socket will be closed in any case.
1130@end deftypefun
1131
1132
1103@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1133@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1104 1134
1105@c ----------------------------------------------------------- 1135@c -----------------------------------------------------------