aboutsummaryrefslogtreecommitdiff
path: root/src/lib/connection_close.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/connection_close.h')
-rw-r--r--src/lib/connection_close.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/lib/connection_close.h b/src/lib/connection_close.h
new file mode 100644
index 00000000..db1778bb
--- /dev/null
+++ b/src/lib/connection_close.h
@@ -0,0 +1,55 @@
1/*
2 This file is part of libmicrohttpd
3 Copyright (C) 2007-2018 Daniel Pittman and Christian Grothoff
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18*/
19/**
20 * @file lib/connection_close.h
21 * @brief functions to close connection
22 * @author Christian Grothoff
23 */
24
25#ifndef CONNECTION_CLOSE_H
26#define CONNECTION_CLOSE_H
27
28/**
29 * Mark connection as "closed".
30 *
31 * @remark To be called from any thread.
32 *
33 * @param connection connection to close
34 */
35void
36MHD_connection_mark_closed_ (struct MHD_Connection *connection)
37 MHD_NONNULL (1);
38
39
40/**
41 * Close the given connection and give the specified termination code
42 * to the user.
43 *
44 * @remark To be called only from thread that process
45 * connection's recv(), send() and response.
46 *
47 * @param connection connection to close
48 * @param cnc termination reason to give
49 */
50void
51MHD_connection_close_ (struct MHD_Connection *connection,
52 enum MHD_ConnectionNotificationCode cnc)
53 MHD_NONNULL (1);
54
55#endif