Skip to content

Class jac::OutputStream

ClassList > jac > OutputStream

Interface for a binary output stream.

  • #include <stream.h>

Inherited by the following classes: jac::Duplex

Public Functions

Type Name
virtual bool flush () = 0
virtual bool put (uint8_t c) = 0
Write a single byte to the stream.
virtual size_t write (std::span< const uint8_t > data) = 0
Write a buffer to the stream.
virtual ~OutputStream () = default

Public Functions Documentation

function flush

virtual bool jac::OutputStream::flush () = 0

function put

Write a single byte to the stream.

virtual bool jac::OutputStream::put (
    uint8_t c
) = 0

Note:

This method should not block.

Parameters:

  • c the byte

Returns:

true if the byte was written, false otherwise

function write

Write a buffer to the stream.

virtual size_t jac::OutputStream::write (
    std::span< const uint8_t > data
) = 0

Note:

This method should not block.

Parameters:

  • data the buffer to write

Returns:

The number of bytes written

function ~OutputStream

virtual jac::OutputStream::~OutputStream () = default

The documentation for this class was generated from the following file src/jac/link/stream.h