My Project
|
for parsing incoming messages. More...
#include <InterprocessQueue.hpp>
Public Types | |
enum | Consume_Result { c_res_indeterminate, c_res_true, c_res_false, c_res_code_body1, c_res_code_body2, c_res_code_body3 } |
Public Member Functions | |
CInterProcessMessageIn_parser () | |
Construct ready to parse the InterProcessMessageIn method. | |
void | reset () |
Reset to initial parser state. | |
template<typename InputIterator > | |
boost::tuple< boost::tribool, InputIterator > | parse (InterProcessMessageIn &req, InputIterator begin, InputIterator end) |
Parse some data. More... | |
for parsing incoming messages.
—++ NPL InterProcessMessage Format The NPL generic message format is as follows:
<verbatim> m_method[' '(1byte)] // (method name string such as "NPL" followed by a space) m_nMsgType(4Bytes) m_nParam1(4Bytes) m_nParam2(4Bytes) m_from_length:[...m_from_length bytes] // m_from name m_filename_length:[...m_filename_length bytes] m_code_length:[...m_code_length bytes] </verbatim>
The following is an example message, where [DWORD] means 4 bytes <verbatim> NPL [DWORD][DWORD][DWORD]11:MyQueueName8:test.lua11:msg={p1=10} </verbatim>
|
inline |
Parse some data.
The tribool return value is true when a complete InterProcessMessageIn has been parsed, false if the data is invalid, indeterminate when more data is required. The InputIterator return value indicates how much of the input has been consumed.