C++ Rest SDK
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Static Public Member Functions | List of all members
web::http::experimental::details::http_server_api Class Reference

Singleton class used to register for http requests and send responses. More...

#include <http_server_api.h>

Static Public Member Functions

static bool __cdecl has_listener ()
 Returns whether or not any listeners are registered. More...
 
static void __cdecl register_server_api (std::unique_ptr< http_server > server_api)
 Registers a HTTP server API. More...
 
static void __cdecl unregister_server_api ()
 Clears the http server API. More...
 
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. More...
 
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. More...
 
static http_server *__cdecl server_api ()
 Gets static HTTP server API. Could be null if no registered listeners. More...
 

Detailed Description

Singleton class used to register for http requests and send responses.

The lifetime is tied to http listener registration. When the first listener registers an instance is created and when the last one unregisters the receiver stops and is destroyed. It can be started back up again if listeners are again registered.

Member Function Documentation

static bool __cdecl web::http::experimental::details::http_server_api::has_listener ( )
static

Returns whether or not any listeners are registered.

static pplx::task<void> __cdecl web::http::experimental::details::http_server_api::register_listener ( _In_ web::http::experimental::listener::details::http_listener_impl pListener)
static

Registers a listener for HTTP requests and starts receiving.

static void __cdecl web::http::experimental::details::http_server_api::register_server_api ( std::unique_ptr< http_server server_api)
static

Registers a HTTP server API.

static http_server* __cdecl web::http::experimental::details::http_server_api::server_api ( )
static

Gets static HTTP server API. Could be null if no registered listeners.

static pplx::task<void> __cdecl web::http::experimental::details::http_server_api::unregister_listener ( _In_ web::http::experimental::listener::details::http_listener_impl pListener)
static

Unregisters the given listener and stops listening for HTTP requests.

static void __cdecl web::http::experimental::details::http_server_api::unregister_server_api ( )
static

Clears the http server API.


The documentation for this class was generated from the following file: