COROIO: NNet::NActors::INode Class Reference
COROIO
 
Loading...
Searching...
No Matches
NNet::NActors::INode Class Referenceabstract

Interface for a remote node connection in the actor transport layer. More...

#include <node.hpp>

Inheritance diagram for NNet::NActors::INode:
NNet::NActors::IOutputStream NNet::NActors::TNode< TPoller >

Public Member Functions

virtual void Send (TEnvelope &&envelope)=0
 Serializes envelope and appends it to the outbound buffer.
 
virtual void StartConnect ()=0
 Initiates an async TCP connection if not already connected or connecting.
 
virtual void Drain ()=0
 Calls StartConnect() then asynchronously writes all buffered bytes to the socket.
 
virtual THostPort GetHostPort () const =0
 Returns the remote host:port this node connects to.
 
- Public Member Functions inherited from NNet::NActors::IOutputStream
virtual std::span< char > Acquire (size_t size)=0
 Reserves size contiguous bytes in the buffer and returns a span over them.
 
virtual void Commit (size_t size)=0
 Marks size previously acquired bytes as ready to send.
 

Detailed Description

Interface for a remote node connection in the actor transport layer.

Extends IOutputStream with the ability to enqueue serialized messages, initiate/maintain a TCP connection, and flush the outbound buffer. TActorSystem holds one INode per remote host:port pair.

Member Function Documentation

◆ Drain()

virtual void NNet::NActors::INode::Drain ( )
pure virtual

Calls StartConnect() then asynchronously writes all buffered bytes to the socket.

Implemented in NNet::NActors::TNode< TPoller >.

◆ GetHostPort()

virtual THostPort NNet::NActors::INode::GetHostPort ( ) const
pure virtual

Returns the remote host:port this node connects to.

Implemented in NNet::NActors::TNode< TPoller >.

◆ Send()

virtual void NNet::NActors::INode::Send ( TEnvelope &&  envelope)
pure virtual

Serializes envelope and appends it to the outbound buffer.

Implemented in NNet::NActors::TNode< TPoller >.

◆ StartConnect()

virtual void NNet::NActors::INode::StartConnect ( )
pure virtual

Initiates an async TCP connection if not already connected or connecting.

Implemented in NNet::NActors::TNode< TPoller >.


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