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

#include <tcp_echo_server.hpp>

Inheritance diagram for tcp_echo_session:
Collaboration diagram for tcp_echo_session:

Public Types

typedef websocketpp::lib::shared_ptr< tcp_echo_sessionptr
 

Public Member Functions

 tcp_echo_session (asio::io_service &service)
 
void start ()
 
void handle_read (const asio::error_code &ec, size_t transferred)
 
void handle_write (const asio::error_code &ec)
 

Public Attributes

asio::ip::tcp::socket m_socket
 
char m_buffer [1024]
 

Detailed Description

Definition at line 44 of file tcp_echo_server.hpp.

Member Typedef Documentation

◆ ptr

typedef websocketpp::lib::shared_ptr<tcp_echo_session> tcp_echo_session::ptr

Definition at line 45 of file tcp_echo_server.hpp.

Constructor & Destructor Documentation

◆ tcp_echo_session()

tcp_echo_session::tcp_echo_session ( asio::io_service &  service)
inline

Definition at line 47 of file tcp_echo_server.hpp.

Referenced by tcp_echo_server::start_accept().

Member Function Documentation

◆ start()

void tcp_echo_session::start ( )
inline

Definition at line 49 of file tcp_echo_server.hpp.

References handle_read(), m_buffer, and m_socket.

◆ handle_read()

void tcp_echo_session::handle_read ( const asio::error_code &  ec,
size_t  transferred 
)
inline

Definition at line 55 of file tcp_echo_server.hpp.

References handle_write(), m_buffer, and m_socket.

Referenced by handle_write(), and start().

◆ handle_write()

void tcp_echo_session::handle_write ( const asio::error_code &  ec)
inline

Definition at line 63 of file tcp_echo_server.hpp.

References handle_read(), m_buffer, and m_socket.

Referenced by handle_read().

Member Data Documentation

◆ m_socket

asio::ip::tcp::socket tcp_echo_session::m_socket

Definition at line 70 of file tcp_echo_server.hpp.

Referenced by handle_read(), handle_write(), and start().

◆ m_buffer

char tcp_echo_session::m_buffer[1024]

Definition at line 71 of file tcp_echo_server.hpp.

Referenced by handle_read(), handle_write(), and start().


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