| 34 | } |
| 35 | |
| 36 | bool H2Settings::IsValid(bool log_error) const { |
| 37 | if (stream_window_size > MAX_WINDOW_SIZE) { |
| 38 | LOG_IF(ERROR, log_error) << "Invalid stream_window_size=" << stream_window_size; |
| 39 | return false; |
| 40 | } |
| 41 | if (connection_window_size < DEFAULT_INITIAL_WINDOW_SIZE || |
| 42 | connection_window_size > MAX_WINDOW_SIZE) { |
| 43 | LOG_IF(ERROR, log_error) << "Invalid connection_window_size=" << connection_window_size; |
| 44 | return false; |
| 45 | } |
| 46 | if (max_frame_size < DEFAULT_MAX_FRAME_SIZE || |
| 47 | max_frame_size > MAX_OF_MAX_FRAME_SIZE) { |
| 48 | LOG_IF(ERROR, log_error) << "Invalid max_frame_size=" << max_frame_size; |
| 49 | return false; |
| 50 | } |
| 51 | return true; |
| 52 | } |
| 53 | |
| 54 | std::ostream& operator<<(std::ostream& os, const H2Settings& s) { |
| 55 | os << "{header_table_size=" << s.header_table_size |
no outgoing calls
no test coverage detected