forked from sony/nmos-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver_utils.h
24 lines (19 loc) · 987 Bytes
/
server_utils.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef NMOS_SERVER_UTILS_H
#define NMOS_SERVER_UTILS_H
#include "cpprest/http_listener.h" // forward declaration of web::http::experimental::listener::http_listener_config
#include "cpprest/ws_listener.h" // forward declaration of web::websockets::experimental::listener::websocket_listener_config
#include "nmos/settings.h"
// Utility types, constants and functions for implementing NMOS REST API servers
namespace nmos
{
// construct listener config based on settings
web::http::experimental::listener::http_listener_config make_http_listener_config(const nmos::settings& settings);
// construct listener config based on settings
web::websockets::experimental::listener::websocket_listener_config make_websocket_listener_config(const nmos::settings& settings);
namespace experimental
{
// map the configured client port to the server port on which to listen
int server_port(int client_port, const nmos::settings& settings);
}
}
#endif