FIX 4.0 Demo 1.0
Loading...
Searching...
No Matches
fix_frame_decoder.hpp
Go to the documentation of this file.
1
8#pragma once
9
10#include <string>
11#include <vector>
12
13namespace fix40 {
14
42public:
48 explicit FixFrameDecoder(size_t max_buffer_size, size_t max_body_length);
49
56 bool can_append(size_t len) const;
57
64 void append(const char* data, size_t len);
65
75 bool next_message(std::string& message);
76
77private:
78 std::string buffer_;
79 const size_t max_buffer_size_;
80 const size_t max_body_length_;
81};
82
83} // namespace fix40
FIX 消息帧解码器
Definition fix_frame_decoder.hpp:41
bool next_message(std::string &message)
尝试从缓冲区提取下一条完整消息
Definition fix_frame_decoder.cpp:32
bool can_append(size_t len) const
检查是否可以追加指定长度的数据
Definition fix_frame_decoder.cpp:16
void append(const char *data, size_t len)
向内部缓冲区追加数据
Definition fix_frame_decoder.cpp:22
Definition matching_engine.hpp:23