static inline void isEqual( const std::vector<u8>& expected, const AmfItem& value, SerializationContext * ctx = nullptr) { std::unique_ptr<SerializationContext> dummy; if (!ctx) { dummy.reset(new SerializationContext()); ctx = dummy.get(); } v8 serialized = value.serialize(*ctx); isEqual(expected, serialized); }
PacketMessage(std::string targetUri, std::string responseUri, const AmfItem& value) : target(targetUri), response(responseUri), value(value.serialize()) { };
PacketHeader(std::string name, bool mustUnderstand, const AmfItem& value) : name(name), mustUnderstand(mustUnderstand), value(value.serialize()) { };