NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
integration.cpp File Reference
Include dependency graph for integration.cpp:

Go to the source code of this file.

Classes

struct  config
 
struct  config::transport_config
 
struct  config_tls
 
struct  config_tls::transport_config
 

Macros

#define BOOST_TEST_MODULE   transport_integration
 

Typedefs

typedef websocketpp::server< configserver
 
typedef websocketpp::client< configclient
 
typedef websocketpp::server< config_tlsserver_tls
 
typedef websocketpp::client< config_tlsclient_tls
 
typedef websocketpp::server< websocketpp::config::coreiostream_server
 
typedef websocketpp::client< websocketpp::config::core_clientiostream_client
 

Functions

template<typename T >
void close_after_timeout (T &e, websocketpp::connection_hdl hdl, long timeout)
 
void run_server (server *s, int port, bool log=false)
 
void run_client (client &c, std::string uri, bool log=false)
 
void run_client_and_mark (client *c, bool *flag, websocketpp::lib::mutex *mutex)
 
void run_time_limited_client (client &c, std::string uri, long timeout, bool log)
 
void run_dummy_server (int port)
 
void run_dummy_client (std::string port)
 
bool on_ping (server *s, websocketpp::connection_hdl, std::string)
 
void cancel_on_open (server *s, websocketpp::connection_hdl)
 
void stop_on_close (server *s, websocketpp::connection_hdl hdl)
 
template<typename T >
void ping_on_open (T *c, std::string payload, websocketpp::connection_hdl hdl)
 
void fail_on_pong (websocketpp::connection_hdl, std::string)
 
void fail_on_pong_timeout (websocketpp::connection_hdl, std::string)
 
void req_pong (std::string expected_payload, websocketpp::connection_hdl, std::string payload)
 
void fail_on_open (websocketpp::connection_hdl)
 
void delay (websocketpp::connection_hdl, long duration)
 
template<typename T >
void check_ec (T *c, websocketpp::lib::error_code ec, websocketpp::connection_hdl hdl)
 
template<typename T >
void check_ec_and_stop (T *e, websocketpp::lib::error_code ec, websocketpp::connection_hdl hdl)
 
template<typename T >
void req_pong_timeout (T *c, std::string expected_payload, websocketpp::connection_hdl hdl, std::string payload)
 
template<typename T >
void close (T *e, websocketpp::connection_hdl hdl)
 
void run_test_timer (long value)
 
 BOOST_AUTO_TEST_CASE (pong_no_timeout)
 
 BOOST_AUTO_TEST_CASE (pong_timeout)
 
 BOOST_AUTO_TEST_CASE (client_open_handshake_timeout)
 
 BOOST_AUTO_TEST_CASE (server_open_handshake_timeout)
 
 BOOST_AUTO_TEST_CASE (client_self_initiated_close_handshake_timeout)
 
 BOOST_AUTO_TEST_CASE (client_peer_initiated_close_handshake_timeout)
 
 BOOST_AUTO_TEST_CASE (server_self_initiated_close_handshake_timeout)
 
 BOOST_AUTO_TEST_CASE (client_runs_out_of_work)
 
 BOOST_AUTO_TEST_CASE (client_is_perpetual)
 
 BOOST_AUTO_TEST_CASE (client_failed_connection)
 
 BOOST_AUTO_TEST_CASE (stop_listening)
 
 BOOST_AUTO_TEST_CASE (pause_reading)
 
 BOOST_AUTO_TEST_CASE (server_connection_cleanup)
 

Macro Definition Documentation

#define BOOST_TEST_MODULE   transport_integration

Definition at line 28 of file integration.cpp.

Typedef Documentation

Definition at line 125 of file integration.cpp.

Definition at line 126 of file integration.cpp.

Definition at line 128 of file integration.cpp.

Definition at line 129 of file integration.cpp.

Function Documentation

template<typename T >
void close_after_timeout ( T &  e,
websocketpp::connection_hdl  hdl,
long  timeout 
)

Definition at line 139 of file integration.cpp.

References websocketpp::close::status::normal.

void run_client_and_mark ( client c,
bool *  flag,
websocketpp::lib::mutex *  mutex 
)
void run_dummy_server ( int  port)
void run_dummy_client ( std::string  port)
void cancel_on_open ( server s,
websocketpp::connection_hdl   
)
template<typename T >
void ping_on_open ( T *  c,
std::string  payload,
websocketpp::connection_hdl  hdl 
)

Definition at line 293 of file integration.cpp.

void fail_on_pong ( websocketpp::connection_hdl  ,
std::string   
)

Definition at line 300 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

void fail_on_pong_timeout ( websocketpp::connection_hdl  ,
std::string   
)

Definition at line 304 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

void req_pong ( std::string  expected_payload,
websocketpp::connection_hdl  ,
std::string  payload 
)

Definition at line 308 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

void fail_on_open ( websocketpp::connection_hdl  )

Definition at line 314 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

template<typename T >
void check_ec ( T *  c,
websocketpp::lib::error_code  ec,
websocketpp::connection_hdl  hdl 
)

Definition at line 323 of file integration.cpp.

template<typename T >
void check_ec_and_stop ( T *  e,
websocketpp::lib::error_code  ec,
websocketpp::connection_hdl  hdl 
)

Definition at line 333 of file integration.cpp.

template<typename T >
void req_pong_timeout ( T *  c,
std::string  expected_payload,
websocketpp::connection_hdl  hdl,
std::string  payload 
)

Definition at line 344 of file integration.cpp.

References websocketpp::close::status::normal.

void run_test_timer ( long  value)

Definition at line 358 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

BOOST_AUTO_TEST_CASE ( client_peer_initiated_close_handshake_timeout  )

Definition at line 467 of file integration.cpp.

BOOST_AUTO_TEST_CASE ( client_runs_out_of_work  )
BOOST_AUTO_TEST_CASE ( client_failed_connection  )

Definition at line 552 of file integration.cpp.

References run_time_limited_client().

BOOST_AUTO_TEST_CASE ( stop_listening  )
BOOST_AUTO_TEST_CASE ( pause_reading  )

Definition at line 577 of file integration.cpp.

References websocketpp::server< config >::get_connection().

BOOST_AUTO_TEST_CASE ( server_connection_cleanup  )

Definition at line 607 of file integration.cpp.

References BOOST_AUTO_TEST_CASE().