26 #if _WIN32_WINNT < _WIN32_WINNT_VISTA
27 #error "Error: http server APIs are not supported in XP"
28 #endif //_WIN32_WINNT < _WIN32_WINNT_VISTA
32 #include "cpprest/http_listener.h"
34 namespace web {
namespace http
86 static pplx::extensibility::critical_section_t s_lock;
89 static void unsafe_register_server_api(std::unique_ptr<http_server> server_api);
92 static std::unique_ptr<http_server> s_server_api;
95 static pplx::details::atomic_long s_registrations;
static pplx::task< void > __cdecl unregister_listener(_In_ web::http::experimental::listener::details::http_listener_impl *pListener)
Unregisters the given listener and stops listening for HTTP requests.
The web namespace contains functionality common to multiple protocols like HTTP and WebSockets...
Definition: base_uri.h:37
static http_server *__cdecl server_api()
Gets static HTTP server API. Could be null if no registered listeners.
static void __cdecl unregister_server_api()
Clears the http server API.
static pplx::task< void > __cdecl register_listener(_In_ web::http::experimental::listener::details::http_listener_impl *pListener)
Registers a listener for HTTP requests and starts receiving.
static bool __cdecl has_listener()
Returns whether or not any listeners are registered.
The Parallel Patterns Library (PPL) task class. A task object represents work that can be executed as...
Definition: pplxtasks.h:4173
static void __cdecl register_server_api(std::unique_ptr< http_server > server_api)
Registers a HTTP server API.
Singleton class used to register for http requests and send responses.
Definition: http_server_api.h:49
Internal class for pointer to implementation design pattern.
Definition: http_listener.h:171
Interface http listeners interact with for receiving and responding to http requests.
Definition: http_server.h:42