exposed uws_app_close function from capi (#1667)
This commit is contained in:
@@ -408,6 +408,20 @@ extern "C"
|
|||||||
uwsApp->domain(std::string(server_name, server_name_length));
|
uwsApp->domain(std::string(server_name, server_name_length));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void uws_app_close(int ssl, uws_app_t *app)
|
||||||
|
{
|
||||||
|
if (ssl)
|
||||||
|
{
|
||||||
|
uWS::SSLApp *uwsApp = (uWS::SSLApp *)app;
|
||||||
|
uwsApp->close();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uWS::App *uwsApp = (uWS::App *)app;
|
||||||
|
uwsApp->close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void uws_app_destroy(int ssl, uws_app_t *app)
|
void uws_app_destroy(int ssl, uws_app_t *app)
|
||||||
{
|
{
|
||||||
if (ssl)
|
if (ssl)
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2022 Ciro Spaciari
|
* Copyright 2022 Ciro Spaciari
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
* in the Software without restriction, including without limitation the rights
|
* in the Software without restriction, including without limitation the rights
|
||||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
* copies of the Software, and to permit persons to whom the Software is
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
* furnished to do so, subject to the following conditions:
|
* furnished to do so, subject to the following conditions:
|
||||||
*
|
*
|
||||||
* The above copyright notice and this permission notice shall be included in all
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
* copies or substantial portions of the Software.
|
* copies or substantial portions of the Software.
|
||||||
*
|
*
|
||||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
@@ -172,6 +172,7 @@ extern "C"
|
|||||||
DLL_EXPORT void uws_app_listen_domain(int ssl, uws_app_t *app, const char *domain, size_t domain_length, uws_listen_domain_handler handler, void *user_data);
|
DLL_EXPORT void uws_app_listen_domain(int ssl, uws_app_t *app, const char *domain, size_t domain_length, uws_listen_domain_handler handler, void *user_data);
|
||||||
DLL_EXPORT void uws_app_listen_domain_with_options(int ssl, uws_app_t *app, const char *domain,size_t domain_length, int options, uws_listen_domain_handler handler, void *user_data);
|
DLL_EXPORT void uws_app_listen_domain_with_options(int ssl, uws_app_t *app, const char *domain,size_t domain_length, int options, uws_listen_domain_handler handler, void *user_data);
|
||||||
DLL_EXPORT void uws_app_domain(int ssl, uws_app_t *app, const char* server_name, size_t server_name_length);
|
DLL_EXPORT void uws_app_domain(int ssl, uws_app_t *app, const char* server_name, size_t server_name_length);
|
||||||
|
DLL_EXPORT void uws_app_close(int ssl, uws_app_t *app);
|
||||||
|
|
||||||
DLL_EXPORT bool uws_constructor_failed(int ssl, uws_app_t *app);
|
DLL_EXPORT bool uws_constructor_failed(int ssl, uws_app_t *app);
|
||||||
DLL_EXPORT unsigned int uws_num_subscribers(int ssl, uws_app_t *app, const char *topic, size_t topic_length);
|
DLL_EXPORT unsigned int uws_num_subscribers(int ssl, uws_app_t *app, const char *topic, size_t topic_length);
|
||||||
|
|||||||
Reference in New Issue
Block a user