Start of a connection state machine, start of a TLV framework.

This commit is contained in:
Ian Gulliver
2015-02-05 21:57:04 +00:00
parent c91b64f892
commit dcbc3d6928
5 changed files with 39 additions and 7 deletions

18
tlv.h Normal file
View File

@@ -0,0 +1,18 @@
#include <stdint.h>
#include <list>
#include <string>
class TLVNode {
public:
TLVNode(const uint16_t type);
TLVNode(const uint16_t type, const std::string value);
static TLVNode* Decode(const std::string& input);
void Encode(std::string *output);
private:
const uint16_t type_;
const std::string value_;
std::list<TLVNode> children_;
};