NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
mock_endpoint Struct Reference
Inheritance diagram for mock_endpoint:
Collaboration diagram for mock_endpoint:

Public Types

typedef websocketpp::transport::asio::endpoint< configbase
 
- Public Types inherited from websocketpp::transport::asio::endpoint< config >
typedef endpoint< configtype
 Type of this endpoint transport component. More...
 
typedef config::concurrency_type concurrency_type
 Type of the concurrency policy. More...
 
typedef config::socket_type socket_type
 Type of the socket policy. More...
 
typedef config::elog_type elog_type
 Type of the error logging policy. More...
 
typedef config::alog_type alog_type
 Type of the access logging policy. More...
 
typedef socket_type::socket_con_type socket_con_type
 Type of the socket connection component. More...
 
typedef socket_con_type::ptr socket_con_ptr
 Type of a shared pointer to the socket connection component. More...
 
typedef asio::connection< configtransport_con_type
 Type of the connection transport component associated with this endpoint transport component. More...
 
typedef transport_con_type::ptr transport_con_ptr
 Type of a shared pointer to the connection transport component associated with this endpoint transport component. More...
 
typedef lib::asio::io_service * io_service_ptr
 Type of a pointer to the ASIO io_service being used. More...
 
typedef lib::shared_ptr< lib::asio::ip::tcp::acceptor > acceptor_ptr
 Type of a shared pointer to the acceptor being used. More...
 
typedef lib::shared_ptr< lib::asio::ip::tcp::resolver > resolver_ptr
 Type of a shared pointer to the resolver being used. More...
 
typedef lib::shared_ptr< lib::asio::steady_timertimer_ptr
 Type of timer handle. More...
 
typedef lib::shared_ptr< lib::asio::io_service::work > work_ptr
 Type of a shared pointer to an io_service work object. More...
 
typedef lib::function< lib::error_code(acceptor_ptr)> tcp_pre_bind_handler
 Type of socket pre-bind handler. More...
 
- Public Types inherited from websocketpp::transport::asio::tls_socket::endpoint
typedef endpoint type
 The type of this endpoint socket component. More...
 
typedef connection socket_con_type
 The type of the corresponding connection socket component. More...
 
typedef socket_con_type::ptr socket_con_ptr
 The type of a shared pointer to the corresponding connection socket component. More...
 

Public Member Functions

 mock_endpoint ()
 
void connect (std::string u)
 
void handle_connect (connection_ptr con, websocketpp::lib::error_code const &ec)
 
- Public Member Functions inherited from websocketpp::transport::asio::endpoint< config >
 endpoint ()
 
 ~endpoint ()
 
bool is_secure () const
 Return whether or not the endpoint produces secure connections. More...
 
void init_asio (io_service_ptr ptr, lib::error_code &ec)
 initialize asio transport with external io_service (exception free) More...
 
void init_asio (io_service_ptr ptr)
 initialize asio transport with external io_service More...
 
void init_asio (lib::error_code &ec)
 Initialize asio transport with internal io_service (exception free) More...
 
void init_asio ()
 Initialize asio transport with internal io_service. More...
 
void set_tcp_pre_bind_handler (tcp_pre_bind_handler h)
 Sets the tcp pre bind handler. More...
 
void set_tcp_pre_init_handler (tcp_init_handler h)
 Sets the tcp pre init handler. More...
 
void set_tcp_init_handler (tcp_init_handler h)
 Sets the tcp pre init handler (deprecated) More...
 
void set_tcp_post_init_handler (tcp_init_handler h)
 Sets the tcp post init handler. More...
 
void set_listen_backlog (int backlog)
 Sets the maximum length of the queue of pending connections. More...
 
void set_reuse_addr (bool value)
 Sets whether to use the SO_REUSEADDR flag when opening listening sockets. More...
 
lib::asio::io_service & get_io_service ()
 Retrieve a reference to the endpoint's io_service. More...
 
lib::asio::ip::tcp::endpoint get_local_endpoint (lib::asio::error_code &ec)
 Get local TCP endpoint. More...
 
void listen (lib::asio::ip::tcp::endpoint const &ep, lib::error_code &ec)
 Set up endpoint for listening manually (exception free) More...
 
void listen (lib::asio::ip::tcp::endpoint const &ep)
 Set up endpoint for listening manually. More...
 
template<typename InternetProtocol >
void listen (InternetProtocol const &internet_protocol, uint16_t port, lib::error_code &ec)
 Set up endpoint for listening with protocol and port (exception free) More...
 
template<typename InternetProtocol >
void listen (InternetProtocol const &internet_protocol, uint16_t port)
 Set up endpoint for listening with protocol and port. More...
 
void listen (uint16_t port, lib::error_code &ec)
 Set up endpoint for listening on a port (exception free) More...
 
void listen (uint16_t port)
 Set up endpoint for listening on a port. More...
 
void listen (std::string const &host, std::string const &service, lib::error_code &ec)
 Set up endpoint for listening on a host and service (exception free) More...
 
void listen (std::string const &host, std::string const &service)
 Set up endpoint for listening on a host and service. More...
 
void stop_listening (lib::error_code &ec)
 Stop listening (exception free) More...
 
void stop_listening ()
 Stop listening. More...
 
bool is_listening () const
 Check if the endpoint is listening. More...
 
std::size_t run ()
 wraps the run method of the internal io_service object More...
 
std::size_t run_one ()
 wraps the run_one method of the internal io_service object More...
 
void stop ()
 wraps the stop method of the internal io_service object More...
 
std::size_t poll ()
 wraps the poll method of the internal io_service object More...
 
std::size_t poll_one ()
 wraps the poll_one method of the internal io_service object More...
 
void reset ()
 wraps the reset method of the internal io_service object More...
 
bool stopped () const
 wraps the stopped method of the internal io_service object More...
 
void start_perpetual ()
 Marks the endpoint as perpetual, stopping it from exiting when empty. More...
 
void stop_perpetual ()
 Clears the endpoint's perpetual flag, allowing it to exit when empty. More...
 
timer_ptr set_timer (long duration, timer_handler callback)
 Call back a function after a period of time. More...
 
void handle_timer (timer_ptr, timer_handler callback, lib::asio::error_code const &ec)
 Timer handler. More...
 
void async_accept (transport_con_ptr tcon, accept_handler callback, lib::error_code &ec)
 Accept the next connection attempt and assign it to con (exception free) More...
 
void async_accept (transport_con_ptr tcon, accept_handler callback)
 Accept the next connection attempt and assign it to con. More...
 
- Public Member Functions inherited from websocketpp::transport::asio::tls_socket::endpoint
 endpoint ()
 
bool is_secure () const
 Checks whether the endpoint creates secure connections. More...
 
void set_socket_init_handler (socket_init_handler h)
 Set socket init handler. More...
 
void set_tls_init_handler (tls_init_handler h)
 Set TLS init handler. More...
 

Public Attributes

connection_ptr m_con
 
websocketpp::lib::shared_ptr< config::alog_typealog
 
websocketpp::lib::shared_ptr< config::elog_typeelog
 

Additional Inherited Members

- Protected Member Functions inherited from websocketpp::transport::asio::endpoint< config >
void init_logging (const lib::shared_ptr< alog_type > &a, const lib::shared_ptr< elog_type > &e)
 Initialize logging. More...
 
void handle_accept (accept_handler callback, lib::asio::error_code const &asio_ec)
 
void async_connect (transport_con_ptr tcon, uri_ptr u, connect_handler cb)
 Initiate a new connection. More...
 
void handle_resolve_timeout (timer_ptr, connect_handler callback, lib::error_code const &ec)
 DNS resolution timeout handler. More...
 
void handle_resolve (transport_con_ptr tcon, timer_ptr dns_timer, connect_handler callback, lib::asio::error_code const &ec, lib::asio::ip::tcp::resolver::iterator iterator)
 
void handle_connect_timeout (transport_con_ptr tcon, timer_ptr, connect_handler callback, lib::error_code const &ec)
 Asio connect timeout handler. More...
 
void handle_connect (transport_con_ptr tcon, timer_ptr con_timer, connect_handler callback, lib::asio::error_code const &ec)
 
lib::error_code init (transport_con_ptr tcon)
 Initialize a connection. More...
 
- Protected Member Functions inherited from websocketpp::transport::asio::tls_socket::endpoint
lib::error_code init (socket_con_ptr scon)
 Initialize a connection. More...
 

Detailed Description

Definition at line 140 of file timers.cpp.

Member Typedef Documentation

◆ base

Constructor & Destructor Documentation

◆ mock_endpoint()

mock_endpoint::mock_endpoint ( )
inline

Definition at line 143 of file timers.cpp.

References websocketpp::log::alevel::all.

Member Function Documentation

◆ connect()

void mock_endpoint::connect ( std::string  u)
inline

Definition at line 152 of file timers.cpp.

References handle_connect(), and websocketpp::session::http_state::init.

Referenced by BOOST_AUTO_TEST_CASE().

◆ handle_connect()

void mock_endpoint::handle_connect ( connection_ptr  con,
websocketpp::lib::error_code const &  ec 
)
inline

Definition at line 171 of file timers.cpp.

Referenced by connect().

Member Data Documentation

◆ m_con

connection_ptr mock_endpoint::m_con

Definition at line 177 of file timers.cpp.

◆ alog

websocketpp::lib::shared_ptr<config::alog_type> mock_endpoint::alog

Definition at line 178 of file timers.cpp.

◆ elog

websocketpp::lib::shared_ptr<config::elog_type> mock_endpoint::elog

Definition at line 179 of file timers.cpp.


The documentation for this struct was generated from the following file: