NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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
 
class  test_deadline_timer
 

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)
 
 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

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   transport_integration

Definition at line 28 of file integration.cpp.

Typedef Documentation

◆ server

Definition at line 125 of file integration.cpp.

◆ client

Definition at line 126 of file integration.cpp.

◆ server_tls

Definition at line 128 of file integration.cpp.

◆ client_tls

Definition at line 129 of file integration.cpp.

◆ iostream_server

◆ iostream_client

Function Documentation

◆ close_after_timeout()

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.

◆ run_server()

◆ run_client()

◆ run_client_and_mark()

void run_client_and_mark ( client c,
bool *  flag,
websocketpp::lib::mutex *  mutex 
)

Definition at line 184 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ run_time_limited_client()

◆ run_dummy_server()

void run_dummy_server ( int  port)

◆ run_dummy_client()

void run_dummy_client ( std::string  port)

◆ on_ping()

bool on_ping ( server s,
websocketpp::connection_hdl  ,
std::string   
)

◆ cancel_on_open()

void cancel_on_open ( server s,
websocketpp::connection_hdl   
)

Definition at line 281 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ stop_on_close()

void stop_on_close ( server s,
websocketpp::connection_hdl  hdl 
)

◆ ping_on_open()

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

Definition at line 293 of file integration.cpp.

◆ fail_on_pong()

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

Definition at line 300 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ fail_on_pong_timeout()

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

Definition at line 304 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ req_pong()

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().

◆ fail_on_open()

void fail_on_open ( websocketpp::connection_hdl  )

Definition at line 314 of file integration.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ delay()

◆ check_ec()

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.

◆ check_ec_and_stop()

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.

◆ req_pong_timeout()

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.

◆ close()

◆ BOOST_AUTO_TEST_CASE() [1/13]

◆ BOOST_AUTO_TEST_CASE() [2/13]

◆ BOOST_AUTO_TEST_CASE() [3/13]

◆ BOOST_AUTO_TEST_CASE() [4/13]

◆ BOOST_AUTO_TEST_CASE() [5/13]

◆ BOOST_AUTO_TEST_CASE() [6/13]

BOOST_AUTO_TEST_CASE ( client_peer_initiated_close_handshake_timeout  )

Definition at line 500 of file integration.cpp.

◆ BOOST_AUTO_TEST_CASE() [7/13]

◆ BOOST_AUTO_TEST_CASE() [8/13]

BOOST_AUTO_TEST_CASE ( client_runs_out_of_work  )

Definition at line 533 of file integration.cpp.

◆ BOOST_AUTO_TEST_CASE() [9/13]

BOOST_AUTO_TEST_CASE ( client_is_perpetual  )

Definition at line 551 of file integration.cpp.

References run_client_and_mark().

◆ BOOST_AUTO_TEST_CASE() [10/13]

BOOST_AUTO_TEST_CASE ( client_failed_connection  )

Definition at line 585 of file integration.cpp.

References run_time_limited_client().

◆ BOOST_AUTO_TEST_CASE() [11/13]

BOOST_AUTO_TEST_CASE ( stop_listening  )

◆ BOOST_AUTO_TEST_CASE() [12/13]

BOOST_AUTO_TEST_CASE ( pause_reading  )

Definition at line 611 of file integration.cpp.

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

◆ BOOST_AUTO_TEST_CASE() [13/13]

BOOST_AUTO_TEST_CASE ( server_connection_cleanup  )