CatapultServer  v0.5.0.1 (Elephant)
catapult::ionet::PacketIo Class Referenceabstract

An interface for reading and writing packets. More...

Inheritance diagram for catapult::ionet::PacketIo:

Public Types

using ReadCallback = consumer< SocketOperationCode, const Packet * >
 
using WriteCallback = consumer< SocketOperationCode >
 

Public Member Functions

virtual ~PacketIo ()=default
 
virtual void read (const ReadCallback &callback)=0
 
virtual void write (const PacketPayload &payload, const WriteCallback &callback)=0
 Writes payload and calls callback on completion. More...
 

Detailed Description

An interface for reading and writing packets.

Member Typedef Documentation

◆ ReadCallback

◆ WriteCallback

Constructor & Destructor Documentation

◆ ~PacketIo()

virtual catapult::ionet::PacketIo::~PacketIo ( )
virtualdefault

Member Function Documentation

◆ read()

virtual void catapult::ionet::PacketIo::read ( const ReadCallback callback)
pure virtual

Reads and consumes the next packet and calls callback on completion. On success, the read packet is passed to callback.

◆ write()

virtual void catapult::ionet::PacketIo::write ( const PacketPayload payload,
const WriteCallback callback 
)
pure virtual

Writes payload and calls callback on completion.

Here is the caller graph for this function:

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