StormByte-Buffer 4.0.0
C++26 buffer module of the StormByte suite
Loading...
Searching...
No Matches
StormByte::Buffer::IO Namespace Reference

Buffered binary sources and sinks. More...

Namespaces

namespace  Drainer
 Status and operations of a Bridge pump thread.

Classes

class  BufferedFileReader
 Final BufferedLocationReader over a filesystem file. More...
class  BufferedFileWriter
 Final BufferedLocationWriter over a filesystem file. More...
class  BufferedLocationReader
 File-like BufferedReader. More...
class  BufferedLocationWriter
 File-like BufferedWriter. More...
class  BufferedReader
 Coordinated binary read source with optional prefetch and cache. More...
class  BufferedWriter
 Coordinated binary write sink with optional chunked write-behind and a delayed-seek page map. More...
class  ReadChunk
 Maximum OriginPull request. More...
class  WriteTransfer
 Maximum OriginPush request in every mode. More...
class  WriteThreshold
 Page drain high watermark. More...
struct  ReaderConfiguration
 Complete non-owning reader policy; scalar time crosses the DLL. More...
struct  WriterConfiguration
 Complete non-owning writer policy; Configure applies all fields together. More...
struct  TransferSnapshot
 Non-I/O snapshot. More...
class  ReadAhead
 Prefetch length knob. More...
class  MaxMemory
 Cache / dirty-page budget knob. More...
class  MaxWait
 Origin wait cap. More...
class  WriteChunk
 Ring unit and drain trigger. More...
class  BackPressure
 Writer ring cap in WriteChunk units. More...
class  ReaderParameters
 Optional reader knobs. More...
class  WriterParameters
 Optional writer knobs. More...
class  ReadTelemetry
 Reader counters on top of StormByte::Buffer::ReadTelemetry. More...
class  WriteTelemetry
 Writer counters on top of StormByte::Buffer::WriteTelemetry. More...
struct  Result
 Per-call status plus how many bytes this call transferred. More...

Enumerations

enum class  Status {
  Ok , End , Error , Failed ,
  TryAgain
}
 Outcome of a single I/O call. More...
enum class  State {
  Idle , Missing , Directory , Permission ,
  NotWritable , Fault , Unavailable
}
 Session state of a coordinated reader or writer. More...
enum class  Location { Local , Remote }
 Where the bytes of a file-like source or sink live. More...

Functions

STORMBYTE_FORCE_INLINE constexpr std::string_view ToString (Status status) noexcept
 Enumerator name of status.
STORMBYTE_FORCE_INLINE constexpr std::string_view ToString (State state) noexcept
 Enumerator name of state.
STORMBYTE_FORCE_INLINE constexpr std::string_view ToString (Location location) noexcept
 Enumerator name of location.

Detailed Description

Buffered binary sources and sinks.

Knob types and parameter bags are header-only. Optional values use Safe provider callbacks for ownership. IO constructors resolve the knobs into byte counts, chunk counts and millisecond durations.

Enumeration Type Documentation

◆ Location

Where the bytes of a file-like source or sink live.

Path is the locator text. This says what that text means. Local is a filesystem path. Remote is anything else (a socket URL, an HTTP URL, a custom scheme).

See also
BufferedLocationReader, BufferedLocationWriter
Enumerator
Local 

Path is a filesystem path on this machine.

Remote 

Path names a non-local target.

◆ State

enum class StormByte::Buffer::IO::State
strong

Session state of a coordinated reader or writer.

Distinct from Status, which is per-call.

Enumerator
Idle 

Armed.

Missing 

Last Open: path or parent does not exist.

Directory 

Last Open: path is a directory.

Permission 

Last Open: exists; read open denied.

NotWritable 

Last Open or mid-write: cannot write.

Fault 

Origin I/O error mid-transfer.

Unavailable 

Construction, after Close, or origin gone.

◆ Status

enum class StormByte::Buffer::IO::Status
strong

Outcome of a single I/O call.

TryAgain is backpressure or a bounded wait. It is not POSIX EAGAIN.

See also
Result, State
Enumerator
Ok 

The call completed as requested (see Result::count).

End 

Origin exhausted; Result::count may be short.

Error 

Origin failed during the call; buffers untouched.

Failed 

Illegal call or dead session; buffers untouched.

TryAgain 

Not accepted; buffers untouched.

State stays Idle.

Function Documentation

◆ ToString() [1/3]

STORMBYTE_FORCE_INLINE constexpr std::string_view StormByte::Buffer::IO::ToString ( Location location)
nodiscardconstexprnoexcept

Enumerator name of location.

Parameters
locationWhere the bytes live.
Returns
Stable name, or empty if unknown.

◆ ToString() [2/3]

STORMBYTE_FORCE_INLINE constexpr std::string_view StormByte::Buffer::IO::ToString ( State state)
nodiscardconstexprnoexcept

Enumerator name of state.

Parameters
stateSession state.
Returns
Stable name, or empty if unknown.

◆ ToString() [3/3]

STORMBYTE_FORCE_INLINE constexpr std::string_view StormByte::Buffer::IO::ToString ( Status status)
nodiscardconstexprnoexcept

Enumerator name of status.

Parameters
statusPer-call status.
Returns
Stable name, or empty if unknown.