dodo
0.0.1
A C++ library to create containerized Linux services
|
A generic STOMP 1.2 frame. More...
#include <stomp.hpp>
Public Types | |
enum | FrameMatch { FrameMatch::NoMatch, FrameMatch::IncompleteMatch, FrameMatch::FullMatch } |
The manner in which frames match the STOMP protocol. More... | |
enum | Version { Version::v1_2 } |
STOMP versions. More... | |
Public Member Functions | |
virtual void | generate (common::Bytes &frame) const =0 |
Generate a frame. More... | |
virtual FrameMatch | match (const common::Bytes &frame, std::list< std::string > &errors) const =0 |
Checks how the data matches a frame specification. More... | |
Data Fields | |
const common::Bytes | command_connect { "STOMP" } |
CONNECT command. More... | |
const common::Bytes | command_connected { "CONNECTED" } |
CONNECTED command. More... | |
const common::Bytes | eol { "\n" } |
EOL sequence - use only as the protocl allows it and the extra serves no purpose. More... | |
const common::Bytes | header_accept_version_1_2 { "accept-version:1.2" } |
STOMP 1.2 accept header. More... | |
Protected Member Functions | |
FrameMatch | readCommand (const common::Bytes &frame, size_t &index, const common::Bytes &command) const |
Read a command from a frame. More... | |
|
strong |
|
pure virtual |
Generate a frame.
frame | The generation destination, which is overwritten. |
Implemented in dodo::network::protocol::stomp::Connected, and dodo::network::protocol::stomp::Connect.
|
pure virtual |
Checks how the data matches a frame specification.
frame | The frame / common::Bytes to match against. |
errors | If returning FrameMatch::NoMatch, one or more errors. |
Implemented in dodo::network::protocol::stomp::Connect.
|
protected |
Read a command from a frame.
frame | The (incomplete) frame |
index | The index into fame (0 for commands). |
command | The command to read. |
Definition at line 32 of file stomp.cpp.
References FullMatch, dodo::common::Bytes::getOctet(), dodo::common::Bytes::getSize(), IncompleteMatch, and NoMatch.
Referenced by dodo::network::protocol::stomp::Connect::match().
const common::Bytes dodo::network::protocol::stomp::Frame::command_connect { "STOMP" } |
CONNECT command.
Definition at line 43 of file stomp.hpp.
Referenced by dodo::network::protocol::stomp::Connect::generate(), and dodo::network::protocol::stomp::Connect::match().
const common::Bytes dodo::network::protocol::stomp::Frame::command_connected { "CONNECTED" } |
const common::Bytes dodo::network::protocol::stomp::Frame::eol { "\n" } |
EOL sequence - use only
as the protocl allows it and the extra
serves no purpose.
Definition at line 40 of file stomp.hpp.
Referenced by dodo::network::protocol::stomp::Connect::generate().
const common::Bytes dodo::network::protocol::stomp::Frame::header_accept_version_1_2 { "accept-version:1.2" } |
STOMP 1.2 accept header.
Definition at line 49 of file stomp.hpp.
Referenced by dodo::network::protocol::stomp::Connect::generate().