qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
text.h File Reference

Protocols for processing text and binary messages in the QB IO system. More...

#include "base.h"
Include dependency graph for text.h:

Go to the source code of this file.

Classes

class  qb::protocol::text::basic_text< _IO_, _StringTrait, _Sep >
 Protocol for text messages delimited by a specific character, yielding a specified string type. More...
struct  qb::protocol::text::basic_text< _IO_, _StringTrait, _Sep >::message
 Structure representing a text message. More...
class  qb::protocol::text::basic_binary< _IO_, _SizeHeader >
 Protocol for binary messages where the payload is preceded by a fixed-size header indicating its length. More...
struct  qb::protocol::text::basic_binary< _IO_, _SizeHeader >::message
 Structure representing a binary message. More...

Typedefs

template<typename _IO_>
using qb::protocol::text::binary8 = basic_binary<_IO_, uint8_t>
 Binary protocol with an 8-bit (uint8_t) size header.
template<typename _IO_>
using qb::protocol::text::binary16 = basic_binary<_IO_, uint16_t>
 Binary protocol with a 16-bit (uint16_t) size header.
template<typename _IO_>
using qb::protocol::text::binary32 = basic_binary<_IO_, uint32_t>
 Binary protocol with a 32-bit (uint32_t) size header.
template<typename _IO_>
using qb::protocol::text::string = basic_text<_IO_, std::string, '\0'>
 Protocol for NULL-terminated (\0) strings, yielding std::string.
template<typename _IO_>
using qb::protocol::text::command = basic_text<_IO_, std::string, '\n'>
 Protocol for newline-terminated (\n) commands, yielding std::string.
template<typename _IO_>
using qb::protocol::text::string_view = basic_text<_IO_, const std::string_view, '\0'>
 Protocol for NULL-terminated (\0) strings, yielding std::string_view (zero-copy read).
template<typename _IO_>
using qb::protocol::text::command_view = basic_text<_IO_, const std::string_view, '\n'>
 Protocol for newline-terminated (\n) commands, yielding std::string_view (zero-copy read).

Detailed Description

Protocols for processing text and binary messages in the QB IO system.

This file defines specialized protocols based on the qb::protocol::base templates to handle different types of text and binary messages. It provides concrete implementations for strings terminated by various delimiters (like null or newline) and binary data preceded by fixed-size length headers.

Author
qb - C++ Actor Framework

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.