| 64 | } |
| 65 | |
| 66 | bool decode_header() |
| 67 | { |
| 68 | char header[header_length + 1] = ""; |
| 69 | std::strncat(header, data_, header_length); |
| 70 | body_length_ = std::atoi(header); |
| 71 | if (body_length_ > max_body_length) |
| 72 | { |
| 73 | body_length_ = 0; |
| 74 | return false; |
| 75 | } |
| 76 | return true; |
| 77 | } |
| 78 | |
| 79 | void encode_header() |
| 80 | { |
no outgoing calls
no test coverage detected