|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Represents a complete WebSocket message. More...
#include <websocket_protocol.h>

Public Member Functions | |
| auto | as_text () const -> std::string |
| Converts message data to string (for text messages). | |
| auto | as_binary () const -> const std::vector< uint8_t > & |
| Returns message data as binary (reference). | |
Public Attributes | |
| ws_message_type | type |
| Message type. | |
| std::vector< uint8_t > | data |
| Message payload. | |
Represents a complete WebSocket message.
A message may consist of one or more frames that have been reassembled. Text messages are UTF-8 encoded.
Definition at line 36 of file websocket_protocol.h.
| auto kcenon::network::internal::ws_message::as_binary | ( | ) | const -> const std::vector<uint8_t>& |
Returns message data as binary (reference).
Definition at line 21 of file websocket_protocol.cpp.
References data.
| auto kcenon::network::internal::ws_message::as_text | ( | ) | const -> std::string |
Converts message data to string (for text messages).
Definition at line 16 of file websocket_protocol.cpp.
References data.
| std::vector<uint8_t> kcenon::network::internal::ws_message::data |
Message payload.
Definition at line 39 of file websocket_protocol.h.
Referenced by as_binary(), as_text(), and kcenon::network::internal::websocket_protocol::handle_data_frame().
| ws_message_type kcenon::network::internal::ws_message::type |
Message type.
Definition at line 38 of file websocket_protocol.h.
Referenced by kcenon::network::internal::websocket_protocol::handle_data_frame().