mirror of
https://github.com/lammertb/libhttp.git
synced 2025-12-22 04:02:04 +03:00
Merge pull request #220 from PhilLab/master
Adding removeWebSocketHandler
This commit is contained in:
@@ -243,6 +243,15 @@ class CIVETWEB_API CivetServer
|
||||
*/
|
||||
void removeHandler(const std::string &uri);
|
||||
|
||||
/**
|
||||
* removeWebSocketHandler(const std::string &)
|
||||
*
|
||||
* Removes a web socket handler.
|
||||
*
|
||||
* @param uri - the exact URL used in addWebSocketHandler().
|
||||
*/
|
||||
void removeWebSocketHandler(const std::string &uri);
|
||||
|
||||
/**
|
||||
* getListeningPorts()
|
||||
*
|
||||
|
||||
@@ -287,6 +287,12 @@ CivetServer::removeHandler(const std::string &uri)
|
||||
mg_set_request_handler(context, uri.c_str(), NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
CivetServer::removeWebSocketHandler(const std::string &uri)
|
||||
{
|
||||
mg_set_websocket_handler(context, uri.c_str(), NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
CivetServer::close()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user