#include "HSExt.hpp" namespace SRT { bool HSExtMessage::loadFromData(uint8_t *buf, size_t len) { if(buf == NULL || len != HSEXT_MSG_SIZE){ return false; } _data = BufferRaw::create(); _data->assign((char*)buf,len); extension_length = 3; HSExt::loadHeader(); assert(extension_type == SRT_CMD_HSREQ || extension_type == SRT_CMD_HSRSP); uint8_t* ptr = (uint8_t*)_data->data()+4; srt_version = loadUint32(ptr); ptr += 4; srt_flag = loadUint32(ptr); ptr += 4; recv_tsbpd_delay = loadUint16(ptr); ptr += 2; send_tsbpd_delay = loadUint16(ptr); ptr += 2; return true; } std::string HSExtMessage::dump(){ _StrPrinter printer; printer << "srt version : "<