Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | List of all members
eclipse::network::AsyncChannel Class Reference

Represent an opened channel between two endpoints. More...

#include <asyncchannel.hh>

Inheritance diagram for eclipse::network::AsyncChannel:
Inheritance graph
Collaboration diagram for eclipse::network::AsyncChannel:
Collaboration graph

Public Member Functions

 AsyncChannel (NetObserver *node_)
 
virtual ~AsyncChannel ()
 
void do_write (messages::Message *) override
 Write asynchronously the message. More...
 
void do_write (std::shared_ptr< std::string > &)
 Write asynchronously the message sharing the payload. More...
 
void do_write_buffer ()
 Write asynchronously the message sharing the payload. More...
 
void do_read ()
 This method implements the reading loop. More...
 
tcp::socket & get_socket ()
 Get internal socket. More...
 
void commit (std::shared_ptr< std::string > &)
 Add a message to the sending queue. More...
 
- Public Member Functions inherited from eclipse::network::Channel
 Channel ()=default
 
virtual ~Channel ()=default
 

Detailed Description

Represent an opened channel between two endpoints.

Attention
It's intended to be used as a base class.
Calling the constructor is not enought, you should also call init function.

Constructor & Destructor Documentation

AsyncChannel::AsyncChannel ( NetObserver node_)
Parameters
node_Observer object
AsyncChannel::~AsyncChannel ( )
virtual

Member Function Documentation

void AsyncChannel::commit ( std::shared_ptr< std::string > &  str_p)

Add a message to the sending queue.

void AsyncChannel::do_read ( )

This method implements the reading loop.

void AsyncChannel::do_write ( messages::Message m)
overridevirtual

Write asynchronously the message.

Implements eclipse::network::Channel.

void AsyncChannel::do_write ( std::shared_ptr< std::string > &  str_p)

Write asynchronously the message sharing the payload.

void AsyncChannel::do_write_buffer ( )

Write asynchronously the message sharing the payload.

tcp::socket & AsyncChannel::get_socket ( )

Get internal socket.


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