MCPcopy Create free account
hub / github.com/apache/brpc / IsValid

Method IsValid

src/brpc/http2.cpp:36–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36bool 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
54std::ostream& operator<<(std::ostream& os, const H2Settings& s) {
55 os << "{header_table_size=" << s.header_table_size

Callers 2

StartInternalMethod · 0.45
get_fd_countFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected