44#include <StormByte/safe/binary.hxx>
45#include <StormByte/serializable.hxx>
234 std::uint16_t maximum_timeout_seconds,
Access access) noexcept;
238 std::uint16_t m_port;
239 std::uint16_t m_maximum_timeout_seconds;
284 std::span<const std::byte> data)
noexcept;
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Buffer::Bridge)
Public, validated descriptor for attaching to one remote file channel.
Definition remote_file_mount.hxx:69
static RemoteFileMount FileBeingRead() noexcept
Construct a result for a write blocked by mounted readers.
static RemoteFileMount FileBeingWritten() noexcept
Construct a result for a mount blocked by an exclusive writer.
Status
Outcome of the application-authorized mount request.
Definition remote_file_mount.hxx:80
Access Mode() const noexcept
Authorized access mode.
std::array< std::byte, 32 > ChannelToken
Fixed-width opaque channel capability.
Definition remote_file_mount.hxx:74
RemoteFileMount(const RemoteFileMount &other)
Copy a validated mount descriptor.
static RemoteFileMount NotAuthorized() noexcept
Construct an application-level authorization denial.
Access
Permitted direction for this mounted channel.
Definition remote_file_mount.hxx:116
Status Result() const noexcept
Mount request result.
static RemoteFileMount Failed() noexcept
Construct a non-authorization mount failure.
static RemoteFileMount Unavailable() noexcept
Construct a missing-file result without channel credentials.
std::uint16_t MaximumTimeoutSeconds() const noexcept
Maximum idle interval for the Client's peer data-plane heartbeat.
const ChannelToken & Token() const noexcept
Opaque capability checked by the private channel protocol.
friend class Server
Server may construct authorized mount descriptors.
Definition remote_file_mount.hxx:245
std::uint16_t Port() const noexcept
Session data-plane port shared by every Authorized mount from one Client.
Network module of the StormByte suite.
Root namespace of the StormByte suite.
std::conditional_t< Type::Reference< T >, std::expected< std::reference_wrapper< std::remove_reference_t< T > >, Safe::Shared< E > >, std::expected< T, Safe::Shared< E > > > Expected
static Expected< Network::RemoteFileMount, DeserializeError > Read(std::span< const std::byte > data) noexcept
Decode and validate a complete mount descriptor.
static ByteSize Size(const Network::RemoteFileMount &data) noexcept
Exact serialized size of a mount descriptor.
static Safe::Binary Write(const Network::RemoteFileMount &data) noexcept
Encode a mount descriptor field-by-field.
#define STORMBYTE_NETWORK_PUBLIC
Definition visibility.h:51