#include <boost/test/unit_test.hpp>
#include <exception>
#include <iostream>
#include <websocketpp/common/thread.hpp>
#include <websocketpp/transport/asio/endpoint.hpp>
#include <websocketpp/transport/asio/security/tls.hpp>
#include <websocketpp/concurrency/none.hpp>
#include <websocketpp/http/request.hpp>
#include <websocketpp/http/response.hpp>
#include <websocketpp/logger/stub.hpp>
#include <boost/asio.hpp>
Go to the source code of this file.
Classes | |
struct | config |
struct | mock_con |
struct | mock_endpoint |
Macros | |
#define | BOOST_TEST_MODULE transport_asio_timers |
Typedefs | |
typedef websocketpp::lib::shared_ptr< boost::asio::ssl::context > | context_ptr |
typedef websocketpp::transport::asio::connection< config > | con_type |
typedef websocketpp::lib::shared_ptr< mock_con > | connection_ptr |
Functions | |
void | run_dummy_server (int port) |
void | run_test_timer (long value) |
context_ptr | on_tls_init (websocketpp::connection_hdl) |
BOOST_AUTO_TEST_CASE (tls_handshake_timeout) | |
#define BOOST_TEST_MODULE transport_asio_timers |
Definition at line 28 of file timers.cpp.
typedef websocketpp::lib::shared_ptr<boost::asio::ssl::context> context_ptr |
Definition at line 109 of file timers.cpp.
Definition at line 135 of file timers.cpp.
typedef websocketpp::lib::shared_ptr<mock_con> connection_ptr |
Definition at line 136 of file timers.cpp.
void run_dummy_server | ( | int | port | ) |
Definition at line 53 of file timers.cpp.
References websocketpp::transport::error::eof, and websocketpp::transport::asio::socket::error::socket.
Referenced by BOOST_AUTO_TEST_CASE().
void run_test_timer | ( | long | value | ) |
Definition at line 81 of file timers.cpp.
References websocketpp::lib::asio::milliseconds().
Referenced by BOOST_AUTO_TEST_CASE().
context_ptr on_tls_init | ( | websocketpp::connection_hdl | ) |
Definition at line 110 of file timers.cpp.
Referenced by BOOST_AUTO_TEST_CASE().
BOOST_AUTO_TEST_CASE | ( | tls_handshake_timeout | ) |
Definition at line 177 of file timers.cpp.
References mock_endpoint::connect(), on_tls_init(), websocketpp::transport::asio::endpoint< config >::run(), run_dummy_server(), run_test_timer(), and websocketpp::transport::asio::tls_socket::endpoint::set_tls_init_handler().