NETSIM  1.0.1
Hardware-in-the-loopacousticnetworksimulator
netsim::tcp_session Class Reference

#include </root/netsim/obj-x86_64-linux-gnu/include/netsim/tcp/tcp_session.h>

Inheritance diagram for netsim::tcp_session:
Collaboration diagram for netsim::tcp_session:

Public Member Functions

 tcp_session (std::unique_ptr< boost::asio::ip::tcp::socket > socket)
 
void start ()
 
void read_callback (typename ReceiveUnparsed::CallbackType f)
 
template<typename ProtobufMessage >
void read_callback (typename Receive< ProtobufMessage >::CallbackType f)
 
void write (const google::protobuf::Message &message)
 
void disconnect ()
 
bool connected ()
 
boost::asio::ip::tcp::endpoint remote_endpoint ()
 

Protected Member Functions

std::unique_ptr< boost::asio::ip::tcp::socket > & socket ()
 

Detailed Description

Definition at line 89 of file tcp_session.h.

Constructor & Destructor Documentation

◆ tcp_session()

netsim::tcp_session::tcp_session ( std::unique_ptr< boost::asio::ip::tcp::socket >  socket)

Member Function Documentation

◆ connected()

bool netsim::tcp_session::connected ( )
inline

Definition at line 113 of file tcp_session.h.

◆ disconnect()

void netsim::tcp_session::disconnect ( )

◆ read_callback() [1/2]

template<typename ProtobufMessage >
void netsim::tcp_session::read_callback ( typename Receive< ProtobufMessage >::CallbackType  f)
inline

Definition at line 104 of file tcp_session.h.

◆ read_callback() [2/2]

void netsim::tcp_session::read_callback ( typename ReceiveUnparsed::CallbackType  f)
inline

Definition at line 96 of file tcp_session.h.

◆ remote_endpoint()

boost::asio::ip::tcp::endpoint netsim::tcp_session::remote_endpoint ( )
inline

Definition at line 115 of file tcp_session.h.

◆ socket()

std::unique_ptr<boost::asio::ip::tcp::socket>& netsim::tcp_session::socket ( )
inlineprotected

Definition at line 124 of file tcp_session.h.

◆ start()

void netsim::tcp_session::start ( )

◆ write()

void netsim::tcp_session::write ( const google::protobuf::Message &  message)

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