aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/http/http_api.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2023-12-17 19:03:29 -0800
committerGarrett D'Amore <garrett@damore.org>2023-12-17 19:09:30 -0800
commit8ff9663c06a18d6c7fe0605de679948d3c4de9d7 (patch)
tree3a5e1884816c7e693eadc83a0f45ddac167c8494 /src/supplemental/http/http_api.h
parent8ccc10bf6a7ce305e5197e8eaf931ac7dc8612c0 (diff)
downloadnng-8ff9663c06a18d6c7fe0605de679948d3c4de9d7.tar.gz
nng-8ff9663c06a18d6c7fe0605de679948d3c4de9d7.tar.bz2
nng-8ff9663c06a18d6c7fe0605de679948d3c4de9d7.zip
fixes #1735 websocket should send, and wait for, WS_CLOSE frames on shutdown
fixes #1733 deadlock in websocket listener close
Diffstat (limited to 'src/supplemental/http/http_api.h')
-rw-r--r--src/supplemental/http/http_api.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/supplemental/http/http_api.h b/src/supplemental/http/http_api.h
index 207f0230..70a43432 100644
--- a/src/supplemental/http/http_api.h
+++ b/src/supplemental/http/http_api.h
@@ -1,5 +1,5 @@
//
-// Copyright 2019 Staysail Systems, Inc. <info@staysail.tech>
+// Copyright 2023 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
// Copyright 2019 Devolutions <info@devolutions.net>
//
@@ -216,8 +216,15 @@ extern int nni_http_server_start(nni_http_server *);
// nni_http_server_stop stops the server, closing the listening socket.
// Connections that have been "upgraded" are unaffected. Connections
// associated with a callback will complete their callback, and then close.
+// Connections will be aborted but may not have terminated all the way.
extern void nni_http_server_stop(nni_http_server *);
+// nni_http_server_close closes down the socket, but does not shut down
+// any connections that are already open. This is useful for example
+// when shutting down an SP listener, and we don't want to break established
+// sessions.
+extern void nni_http_server_close(nni_http_server *);
+
// nni_http_server_set_error_page sets an error page for the named status.
extern int nni_http_server_set_error_page(
nni_http_server *, uint16_t, const char *);