43#include <StormByte/buffer/io/buffered_location_reader.hxx>
44#include <StormByte/buffer/io/buffered_location_writer.hxx>
46#include <StormByte/safe/optional.hxx>
47#include <StormByte/safe/pointers.hxx>
48#include <StormByte/safe/string.hxx>
179 void MarkFailed() noexcept;
185 bool ReleaseToken() noexcept;
205 bool m_token_released{
false};
220 template<
class T,
class... Args>
339 void MarkFailed() noexcept;
345 bool ReleaseToken() noexcept;
365 bool m_token_released{
false};
380 template<
class T,
class... Args>
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Buffer::Bridge)
Peer-scoped multiplexed request transport.
StormByte::Safe::Shared< StormByte::System::Device > Device() const
StormByte::Safe::Shared< StormByte::System::Device > Device() const
File-like buffered reader backed by a peer DataPlane and mount token.
Definition remote_file.hxx:80
StormByte::Safe::Shared< StormByte::System::Device > OriginDevice() const override
Network-interface snapshot for this connected origin.
Buffer::IO::Result OriginSeek(std::ptrdiff_t offset, Buffer::Position mode) override
Move only this Buffer leaf's logical cursor.
~BufferedRemoteFileReader() noexcept override
Release this leaf's token before base destruction.
Buffer::IO::Result OriginOpen() override
Open the token's server-side reader handle.
friend class Client
Client may construct mounted reader leaves.
Definition remote_file.hxx:210
StormByte::Safe::Optional< StormByte::ByteSize > OriginSize() const noexcept override
Query the server-side file length.
BufferedRemoteFileReader & operator=(BufferedRemoteFileReader &&)=delete
Move assignment is disabled while a mount token is registered.
BufferedRemoteFileReader & operator=(const BufferedRemoteFileReader &)=delete
Copy assignment is disabled.
BufferedRemoteFileReader(BufferedRemoteFileReader &&)=delete
Move construction is disabled while a mount token is registered.
Buffer::IO::Result OriginPull(StormByte::ByteSize count, Buffer::FIFO &destination) override
Pull one protocol-bounded segment at this leaf's absolute logical offset.
bool OriginDeviceUsable(const StormByte::Safe::Shared< StormByte::System::Device > &device) const noexcept override
Accept the network device without probing its accessor as a filesystem path.
Buffer::IO::Result OriginClose() override
Release this reader token without closing the peer plane.
BufferedRemoteFileReader(const BufferedRemoteFileReader &)=delete
Copy construction is disabled.
File-like buffered writer with an exclusive server-side mount.
Definition remote_file.hxx:229
Buffer::IO::Result OriginFlush() override
Flush the server-side writer handle.
~BufferedRemoteFileWriter() noexcept override
Release this leaf's token before base destruction.
BufferedRemoteFileWriter(BufferedRemoteFileWriter &&)=delete
Move construction is disabled while a mount token is registered.
Buffer::IO::Result OriginClose() override
Release this writer token without closing the peer plane.
Buffer::IO::Result OriginOpen() override
Open this writer token on the peer plane.
Buffer::IO::Result OriginPush(std::span< const std::byte > data) override
Write one protocol-bounded segment at this leaf's absolute logical offset.
BufferedRemoteFileWriter & operator=(const BufferedRemoteFileWriter &)=delete
Copy assignment is disabled.
friend class Client
Client may construct mounted writer leaves.
Definition remote_file.hxx:370
bool OriginDeviceUsable(const StormByte::Safe::Shared< StormByte::System::Device > &device) const noexcept override
Accept the network device without probing its accessor as a filesystem path.
Buffer::IO::Result OriginTruncate() override
Truncate the server-side file to zero bytes.
BufferedRemoteFileWriter(const BufferedRemoteFileWriter &)=delete
Copy construction is disabled.
StormByte::ByteSize OriginSize() const noexcept override
Query the greater of the server file length and accepted logical write position.
StormByte::Safe::Shared< StormByte::System::Device > OriginDevice() const override
Network-interface snapshot for this connected origin.
BufferedRemoteFileWriter & operator=(BufferedRemoteFileWriter &&)=delete
Move assignment is disabled while a mount token is registered.
Buffer::IO::Result OriginSeek(StormByte::ByteSize absolute) override
Set this Buffer leaf's local writer offset.
Public, validated descriptor for attaching to one remote file channel.
Definition remote_file_mount.hxx:69
Private remote-file implementation namespace.
Network module of the StormByte suite.
StormByte::Safe::Unique< BufferedRemoteFileReader > RemoteFileReaderHandle
Base-heap owner movable to Unique<Buffer::IO::BufferedLocationReader> without slicing.
Definition remote_file.hxx:387
StormByte::Safe::Unique< BufferedRemoteFileWriter > RemoteFileWriterHandle
Base-heap owner movable to Unique<Buffer::IO::BufferedLocationWriter> without slicing.
Definition remote_file.hxx:392
Unique< T > MakeUnique(Args &&... args)
Root namespace of the StormByte suite.
#define STORMBYTE_NETWORK_PUBLIC
Definition visibility.h:51