StormByte-Buffer 2.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  BackPressure
 Writer ring cap in WriteChunk units. More...
 
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  MaxMemory
 Cache / dirty-page budget knob. More...
 
class  MaxWait
 Origin wait cap. More...
 
class  ReadAhead
 Prefetch length knob. More...
 
class  ReaderParameters
 Optional reader knobs. More...
 
class  ReadTelemetry
 Reader counters on top of StormByte::Buffer::ReadTelemetry. More...
 
struct  Result
 Per-call status plus how many bytes this call transferred. More...
 
class  WriteChunk
 Origin push unit. More...
 
class  WriterParameters
 Optional writer knobs. More...
 
class  WriteTelemetry
 Writer counters on top of StormByte::Buffer::WriteTelemetry. 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

constexpr std::string_view ToString (Status status) noexcept
 Enumerator name of status.
 
constexpr std::string_view ToString (State state) noexcept
 Enumerator name of state.
 
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. Every function is STORMBYTE_FORCE_INLINE so the compiler cannot emit a call into the StormByte-Buffer DLL. std::optional and the variadic pack stay in the caller. The DLL receives only resolved ByteSize, std::size_t and milliseconds.

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 

Ctor, 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]

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

Enumerator name of location.

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

◆ ToString() [2/3]

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

Enumerator name of state.

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

◆ ToString() [3/3]

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

Enumerator name of status.

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