NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
connection.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <cstring>
#include <string>
#include <websocketpp/common/memory.hpp>
#include <websocketpp/error.hpp>
#include <websocketpp/transport/iostream/connection.hpp>
#include <websocketpp/concurrency/basic.hpp>
#include <websocketpp/logger/basic.hpp>
Include dependency graph for connection.cpp:

Go to the source code of this file.

Classes

struct  config
 
struct  stub_con
 

Macros

#define BOOST_TEST_MODULE   transport_iostream_connection
 

Typedefs

typedef websocketpp::transport::iostream::connection< configiostream_con
 

Functions

 BOOST_AUTO_TEST_CASE (const_methods)
 
 BOOST_AUTO_TEST_CASE (write_before_output_method_set)
 
 BOOST_AUTO_TEST_CASE (async_write_ostream)
 
websocketpp::lib::error_code write_handler (std::string &o, websocketpp::connection_hdl, char const *buf, size_t len)
 
websocketpp::lib::error_code vector_write_handler (std::string &o, websocketpp::connection_hdl, std::vector< websocketpp::transport::buffer > const &bufs)
 
websocketpp::lib::error_code write_handler_error (websocketpp::connection_hdl, char const *, size_t)
 
 BOOST_AUTO_TEST_CASE (async_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_handler_error)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_0_ostream)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_0_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_1_ostream)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_1_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_2_ostream)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_2_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_2_vector_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_too_much)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_double_read)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least2)
 
void timer_callback_stub (websocketpp::lib::error_code const &)
 
 BOOST_AUTO_TEST_CASE (set_timer)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_read_some)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_read_some_indef)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_read_all)
 
 BOOST_AUTO_TEST_CASE (eof_flag)
 
 BOOST_AUTO_TEST_CASE (fatal_error_flag)
 
 BOOST_AUTO_TEST_CASE (shutdown)
 
websocketpp::lib::error_code sd_handler (websocketpp::connection_hdl)
 
 BOOST_AUTO_TEST_CASE (shutdown_handler)
 
 BOOST_AUTO_TEST_CASE (clear_handler)
 
 BOOST_AUTO_TEST_CASE (shared_pointer_memory_cleanup)
 

Variables

websocketpp::lib::shared_ptr< config::alog_typealogger = websocketpp::lib::make_shared<config::alog_type>()
 
websocketpp::lib::shared_ptr< config::elog_typeelogger = websocketpp::lib::make_shared<config::elog_type>()
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   transport_iostream_connection

Definition at line 28 of file connection.cpp.

Typedef Documentation

◆ iostream_con

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/26]

BOOST_AUTO_TEST_CASE ( const_methods  )

Definition at line 170 of file connection.cpp.

References alogger, and elogger.

◆ BOOST_AUTO_TEST_CASE() [2/26]

BOOST_AUTO_TEST_CASE ( write_before_output_method_set  )

◆ BOOST_AUTO_TEST_CASE() [3/26]

BOOST_AUTO_TEST_CASE ( async_write_ostream  )

Definition at line 188 of file connection.cpp.

References alogger, and elogger.

◆ write_handler()

websocketpp::lib::error_code write_handler ( std::string &  o,
websocketpp::connection_hdl  ,
char const *  buf,
size_t  len 
)

Definition at line 201 of file connection.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ vector_write_handler()

websocketpp::lib::error_code vector_write_handler ( std::string &  o,
websocketpp::connection_hdl  ,
std::vector< websocketpp::transport::buffer > const &  bufs 
)

Definition at line 206 of file connection.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ write_handler_error()

websocketpp::lib::error_code write_handler_error ( websocketpp::connection_hdl  ,
char const *  ,
size_t   
)

◆ BOOST_AUTO_TEST_CASE() [4/26]

BOOST_AUTO_TEST_CASE ( async_write_handler  )

Definition at line 219 of file connection.cpp.

References alogger, elogger, and write_handler().

◆ BOOST_AUTO_TEST_CASE() [5/26]

BOOST_AUTO_TEST_CASE ( async_write_handler_error  )

◆ BOOST_AUTO_TEST_CASE() [6/26]

BOOST_AUTO_TEST_CASE ( async_write_vector_0_ostream  )

Definition at line 243 of file connection.cpp.

References alogger, bufs, and elogger.

◆ BOOST_AUTO_TEST_CASE() [7/26]

BOOST_AUTO_TEST_CASE ( async_write_vector_0_write_handler  )

Definition at line 257 of file connection.cpp.

References alogger, bufs, elogger, and write_handler().

◆ BOOST_AUTO_TEST_CASE() [8/26]

BOOST_AUTO_TEST_CASE ( async_write_vector_1_ostream  )

Definition at line 278 of file connection.cpp.

References alogger, bufs, and elogger.

◆ BOOST_AUTO_TEST_CASE() [9/26]

BOOST_AUTO_TEST_CASE ( async_write_vector_1_write_handler  )

Definition at line 296 of file connection.cpp.

References alogger, bufs, elogger, and write_handler().

◆ BOOST_AUTO_TEST_CASE() [10/26]

BOOST_AUTO_TEST_CASE ( async_write_vector_2_ostream  )

Definition at line 320 of file connection.cpp.

References alogger, bufs, and elogger.

◆ BOOST_AUTO_TEST_CASE() [11/26]

BOOST_AUTO_TEST_CASE ( async_write_vector_2_write_handler  )

Definition at line 340 of file connection.cpp.

References alogger, bufs, elogger, and write_handler().

◆ BOOST_AUTO_TEST_CASE() [12/26]

BOOST_AUTO_TEST_CASE ( async_write_vector_2_vector_write_handler  )

Definition at line 366 of file connection.cpp.

References alogger, bufs, elogger, and vector_write_handler().

◆ BOOST_AUTO_TEST_CASE() [13/26]

BOOST_AUTO_TEST_CASE ( async_read_at_least_too_much  )

◆ BOOST_AUTO_TEST_CASE() [14/26]

BOOST_AUTO_TEST_CASE ( async_read_at_least_double_read  )

◆ BOOST_AUTO_TEST_CASE() [15/26]

BOOST_AUTO_TEST_CASE ( async_read_at_least  )

◆ BOOST_AUTO_TEST_CASE() [16/26]

BOOST_AUTO_TEST_CASE ( async_read_at_least2  )

◆ timer_callback_stub()

void timer_callback_stub ( websocketpp::lib::error_code const &  )

Definition at line 470 of file connection.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ BOOST_AUTO_TEST_CASE() [17/26]

BOOST_AUTO_TEST_CASE ( set_timer  )

Definition at line 472 of file connection.cpp.

References alogger, elogger, and timer_callback_stub().

◆ BOOST_AUTO_TEST_CASE() [18/26]

BOOST_AUTO_TEST_CASE ( async_read_at_least_read_some  )

◆ BOOST_AUTO_TEST_CASE() [19/26]

BOOST_AUTO_TEST_CASE ( async_read_at_least_read_some_indef  )

◆ BOOST_AUTO_TEST_CASE() [20/26]

BOOST_AUTO_TEST_CASE ( async_read_at_least_read_all  )

◆ BOOST_AUTO_TEST_CASE() [21/26]

BOOST_AUTO_TEST_CASE ( eof_flag  )

◆ BOOST_AUTO_TEST_CASE() [22/26]

BOOST_AUTO_TEST_CASE ( fatal_error_flag  )

◆ BOOST_AUTO_TEST_CASE() [23/26]

BOOST_AUTO_TEST_CASE ( shutdown  )

◆ sd_handler()

websocketpp::lib::error_code sd_handler ( websocketpp::connection_hdl  )

◆ BOOST_AUTO_TEST_CASE() [24/26]

BOOST_AUTO_TEST_CASE ( shutdown_handler  )

◆ BOOST_AUTO_TEST_CASE() [25/26]

BOOST_AUTO_TEST_CASE ( clear_handler  )

◆ BOOST_AUTO_TEST_CASE() [26/26]

BOOST_AUTO_TEST_CASE ( shared_pointer_memory_cleanup  )

Variable Documentation

◆ alogger

websocketpp::lib::shared_ptr<config::alog_type> alogger = websocketpp::lib::make_shared<config::alog_type>()

Definition at line 167 of file connection.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ elogger

websocketpp::lib::shared_ptr<config::elog_type> elogger = websocketpp::lib::make_shared<config::elog_type>()

Definition at line 168 of file connection.cpp.

Referenced by BOOST_AUTO_TEST_CASE().