diff --git a/websocketpp/frame.hpp b/websocketpp/frame.hpp index 32b50a64fc..85792cfa20 100644 --- a/websocketpp/frame.hpp +++ b/websocketpp/frame.hpp @@ -456,35 +456,6 @@ inline size_t get_header_len(basic_header const & h) { return size; } -/// Set the frame's size -/** - * @param [out] h The basic header to set. - * @param [out] eh The extended header to set. - * @param [in] The size to set. - * @return What error occurred, if any. - */ -inline lib::error_code set_size(basic_header & h, extended_header & eh, uint64_t - size) -{ - // make sure value isn't too big - uint8_t basic_value; - - if (size <= limits::payload_size_basic) { - basic_value = static_cast(size); - } else if (size <= limits::payload_size_extended) { - basic_value = payload_size_code_16bit; - } else if (size <= limits::payload_size_jumbo) { - basic_value = payload_size_code_64bit; - } else { - // error - return lib::error_code(); - } - - h.b1 = (basic_value & BHB1_PAYLOAD) | (h.b1 & BHB1_MASK); - - return lib::error_code(); -} - /// Calculate the offset location of the masking key within the extended header /** * Calculate the offset location of the masking key within the extended header