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

Go to the source code of this file.

Macros

#define BOOST_TEST_MODULE   server
 

Typedefs

typedef websocketpp::server< websocketpp::config::coreserver
 
typedef websocketpp::config::core::message_type::ptr message_ptr
 

Functions

std::string run_server_test (server &s, std::string input)
 
void echo_func (server *s, websocketpp::connection_hdl hdl, message_ptr msg)
 
bool validate_func_subprotocol (server *s, std::string *out, std::string accept, websocketpp::connection_hdl hdl)
 
void open_func_subprotocol (server *s, std::string *out, websocketpp::connection_hdl hdl)
 
 BOOST_AUTO_TEST_CASE (basic_websocket_request)
 
 BOOST_AUTO_TEST_CASE (invalid_websocket_version)
 
 BOOST_AUTO_TEST_CASE (unimplemented_websocket_version)
 
 BOOST_AUTO_TEST_CASE (list_subprotocol_empty)
 
 BOOST_AUTO_TEST_CASE (list_subprotocol_one)
 
 BOOST_AUTO_TEST_CASE (accept_subprotocol_one)
 
 BOOST_AUTO_TEST_CASE (accept_subprotocol_invalid)
 
 BOOST_AUTO_TEST_CASE (accept_subprotocol_two)
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   server

Definition at line 28 of file server.cpp.

Typedef Documentation

◆ server

Definition at line 38 of file server.cpp.

◆ message_ptr

Function Documentation

◆ run_server_test()

◆ echo_func()

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

Definition at line 86 of file server.cpp.

References websocketpp::endpoint< connection, config >::send().

◆ validate_func_subprotocol()

bool validate_func_subprotocol ( server s,
std::string *  out,
std::string  accept,
websocketpp::connection_hdl  hdl 
)

◆ open_func_subprotocol()

void open_func_subprotocol ( server s,
std::string *  out,
websocketpp::connection_hdl  hdl 
)

◆ BOOST_AUTO_TEST_CASE() [1/8]

BOOST_AUTO_TEST_CASE ( basic_websocket_request  )

◆ BOOST_AUTO_TEST_CASE() [2/8]

BOOST_AUTO_TEST_CASE ( invalid_websocket_version  )

◆ BOOST_AUTO_TEST_CASE() [3/8]

BOOST_AUTO_TEST_CASE ( unimplemented_websocket_version  )

◆ BOOST_AUTO_TEST_CASE() [4/8]

◆ BOOST_AUTO_TEST_CASE() [5/8]

◆ BOOST_AUTO_TEST_CASE() [6/8]

◆ BOOST_AUTO_TEST_CASE() [7/8]

◆ BOOST_AUTO_TEST_CASE() [8/8]