dodo
0.0.1
A C++ library to create containerized Linux services
|
Go to the documentation of this file.
23 #ifndef network_protocol_stomp_hpp
24 #define network_protocol_stomp_hpp
std::string host_
STOMP host to CONNECT.
size_t heartbeat_in_ms_
Desired incoming heartbeat delay in milliseconds.
virtual FrameMatch match(const common::Bytes &frame, std::list< std::string > &errors) const
Checks how the data matches a frame specification.
size_t heartbeat_out_ms_
Offered outgoing heartbeat delay in milliseconds.
virtual FrameMatch match(const common::Bytes &frame, std::list< std::string > &errors) const =0
Checks how the data matches a frame specification.
Version version_
STOMP protocol version required in CONNECT handshake.
size_t heartbeat_in_ms_
Desired incoming heartbeat delay in milliseconds.
@ FullMatch
Complete match.
Connected(const Version &version)
Constructor.
const common::Bytes command_connect
CONNECT command.
An array of Octets with size elements.
std::string getHost() const
Return the STOMP host.
std::string getLogin() const
Return the login.
@ IncompleteMatch
Match, but incomplete.
const common::Bytes command_connected
CONNECTED command.
const common::Bytes eol
EOL sequence - use only as the protocl allows it and the extra serves no purpose.
std::string session_id_
The session id.
std::string passcode_
Optional passcode (required if login is not empty)
std::string login_
Optional login.
Connect(const Version &version=Version::v1_2)
Constructor.
std::string getPasscode() const
Return the passcode.
The STOMP 1.2 protocol (earlier versions not supported).
void setHeartbeat(size_t out, size_t in)
Set the heartbeat.
std::string server_
The server id.
FrameMatch readCommand(const common::Bytes &frame, size_t &index, const common::Bytes &command) const
Read a command from a frame.
size_t heartbeat_out_ms_
Offered outgoing heartbeat delay in milliseconds.
A generic STOMP 1.2 frame.
FrameMatch
The manner in which frames match the STOMP protocol.
Version version_
STOMP protocol version required in CONNECT handshake.
void setLogin(const std::string &login)
Set the login.
void setHost(const std::string &host)
Set the STOMP host.
void setPasscode(const std::string &passcode)
Set the login.
virtual void generate(common::Bytes &frame) const
Generate a CONNECTED frame.
const common::Bytes header_accept_version_1_2
STOMP 1.2 accept header.
size_t getHeartbeatOut() const
Return the outgoing heartbeat in milliseconds.
virtual void generate(common::Bytes &frame) const
Generate a STOMP (CONNECT) frame.
virtual void generate(common::Bytes &frame) const =0
Generate a frame.