StormByte C++ Library: Network module 1.1.0
StormByte-Network is the C++26 networking module of the StormByte suite.
Loading...
Searching...
No Matches
rw.hxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte-Network.
5 *
6 * StormByte-Network is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License version 3
8 * or later, as published by the Free Software Foundation.
9 *
10 * StormByte-Network is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with StormByte-Network. If not, see
17 * <https://www.gnu.org/licenses/lgpl-3.0.html>.
18 */
19
20#pragma once
21
23
24#include <string>
25
33 namespace Read {
46 }
47
51 namespace Write {
57 Success,
58 Failed
59 };
60 }
61
68 switch (result) {
75 default: return "Unknown";
76 }
77 }
78
85 switch (result) {
88 default: return "Unknown";
89 }
90 }
91}
Result
Outcome of a wait/read.
Definition rw.hxx:38
@ WouldBlock
Non-blocking: no data yet.
Result
Outcome of a write.
Definition rw.hxx:56
Connection types of the Network module.
Definition client.hxx:31
constexpr std::string ToString(const StormByte::Network::Connection::Read::Result &result) noexcept
Read result as text.
Definition rw.hxx:67
#define STORMBYTE_NETWORK_PUBLIC
Definition visibility.h:28