BCNP 3.2.1
Batched Command Network Protocol
Loading...
Searching...
No Matches
bcnp::ByteStream Class Referenceabstract

Interface for receiving raw bytes from a transport. More...

#include <adapter.h>

Inheritance diagram for bcnp::ByteStream:
[legend]

Public Member Functions

virtual ~ByteStream ()=default
 
virtual std::size_t ReceiveChunk (uint8_t *buffer, std::size_t maxLength)=0
 Receive available bytes from the transport (non-blocking).
 

Detailed Description

Interface for receiving raw bytes from a transport.

Definition at line 27 of file adapter.h.

Constructor & Destructor Documentation

◆ ~ByteStream()

virtual bcnp::ByteStream::~ByteStream ( )
virtualdefault

Member Function Documentation

◆ ReceiveChunk()

virtual std::size_t bcnp::ByteStream::ReceiveChunk ( uint8_t * buffer,
std::size_t maxLength )
pure virtual

Receive available bytes from the transport (non-blocking).

Parameters
bufferDestination buffer
maxLengthMaximum bytes to read
Returns
Number of bytes actually read (0 if none available)

Implemented in bcnp::TcpPosixAdapter, and bcnp::UdpPosixAdapter.

Here is the caller graph for this function:

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