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

Abstract write-buffer interface used by the actor transport layer. More...

#include <node.hpp>

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

Public Member Functions

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

Abstract write-buffer interface used by the actor transport layer.

Follows an acquire/commit pattern: call Acquire to reserve contiguous space, write into it, then call Commit with the number of bytes actually written. This allows zero-copy serialization directly into network buffers.

Member Function Documentation

◆ Acquire()

virtual std::span< char > NNet::NActors::IOutputStream::Acquire ( size_t  size)
pure virtual

Reserves size contiguous bytes in the buffer and returns a span over them.

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

◆ Commit()

virtual void NNet::NActors::IOutputStream::Commit ( size_t  size)
pure virtual

Marks size previously acquired bytes as ready to send.

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


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