NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
echo_server_tls.cpp File Reference
#include <websocketpp/config/asio.hpp>
#include <websocketpp/server.hpp>
#include <iostream>
Include dependency graph for echo_server_tls.cpp:

Go to the source code of this file.

Typedefs

typedef websocketpp::server< websocketpp::config::asio_tlsserver
 NOTES. More...
 
typedef websocketpp::config::asio::message_type::ptr message_ptr
 
typedef websocketpp::lib::shared_ptr< websocketpp::lib::asio::ssl::context > context_ptr
 

Enumerations

enum  tls_mode { MOZILLA_INTERMEDIATE = 1, MOZILLA_MODERN = 2 }
 

Functions

void on_message (server *s, websocketpp::connection_hdl hdl, message_ptr msg)
 
void on_http (server *s, websocketpp::connection_hdl hdl)
 
std::string get_password ()
 
context_ptr on_tls_init (tls_mode mode, websocketpp::connection_hdl hdl)
 
int main ()
 

Typedef Documentation

◆ server

NOTES.

This example uses a number of standard classes through the websocketpp::lib namespace. This is to allow easy switching between Boost, the C++11 STL, and the standalone Asio library. Your program need not use these namespaces if you do not need this sort of flexibility.

Definition at line 43 of file echo_server_tls.cpp.

◆ message_ptr

◆ context_ptr

typedef websocketpp::lib::shared_ptr<websocketpp::lib::asio::ssl::context> context_ptr

Definition at line 51 of file echo_server_tls.cpp.

Enumeration Type Documentation

◆ tls_mode

enum tls_mode
Enumerator
MOZILLA_INTERMEDIATE 
MOZILLA_MODERN 

Definition at line 79 of file echo_server_tls.cpp.

Function Documentation

◆ on_message()

void on_message ( server s,
websocketpp::connection_hdl  hdl,
message_ptr  msg 
)

◆ on_http()

◆ get_password()

std::string get_password ( )

Definition at line 73 of file echo_server_tls.cpp.

Referenced by on_tls_init().

◆ on_tls_init()

context_ptr on_tls_init ( tls_mode  mode,
websocketpp::connection_hdl  hdl 
)

Definition at line 84 of file echo_server_tls.cpp.

References get_password(), and MOZILLA_MODERN.

Referenced by main().

◆ main()