Working app.close
This commit is contained in:
@@ -249,12 +249,14 @@ public:
|
|||||||
MoveOnlyFunction<void(WebSocket<SSL, true, UserData> *, int, std::string_view)> close = nullptr;
|
MoveOnlyFunction<void(WebSocket<SSL, true, UserData> *, int, std::string_view)> close = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Closes all sockets. Does not close listen sockets. */
|
/* Closes all sockets including listen sockets. */
|
||||||
TemplatedApp &&closeSockets() {
|
TemplatedApp &&close() {
|
||||||
us_socket_context_close(SSL, httpContext);
|
us_socket_context_close(SSL, (struct us_socket_context_t *) httpContext);
|
||||||
for (void *webSocketContext : webSocketContexts) {
|
for (void *webSocketContext : webSocketContexts) {
|
||||||
us_socket_context_close(SSL, webSocketContext);
|
us_socket_context_close(SSL, (struct us_socket_context_t *) webSocketContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return std::move(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename UserData>
|
template <typename UserData>
|
||||||
|
|||||||
+1
-1
Submodule uSockets updated: afd527a99c...034575d651
Reference in New Issue
Block a user