NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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...
 
- 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_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
 
config::alog_type alog
 
config::elog_type elog
 

Additional Inherited Members

- Protected Member Functions inherited from websocketpp::transport::asio::endpoint< config >
void init_logging (alog_type *a, 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 138 of file timers.cpp.

Member Typedef Documentation

Constructor & Destructor Documentation

mock_endpoint::mock_endpoint ( )
inline

Definition at line 141 of file timers.cpp.

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

Member Function Documentation

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

Definition at line 147 of file timers.cpp.

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

Referenced by BOOST_AUTO_TEST_CASE().

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

Definition at line 166 of file timers.cpp.

Referenced by connect().

Member Data Documentation

connection_ptr mock_endpoint::m_con

Definition at line 172 of file timers.cpp.

config::alog_type mock_endpoint::alog

Definition at line 173 of file timers.cpp.

config::elog_type mock_endpoint::elog

Definition at line 174 of file timers.cpp.


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