The C and C++ Include Header Files
/usr/include/nodejs/src/node_http2_state.h
$ cat -n /usr/include/nodejs/src/node_http2_state.h 1 #ifndef SRC_NODE_HTTP2_STATE_H_ 2 #define SRC_NODE_HTTP2_STATE_H_ 3 4 #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 5 6 #include "aliased_buffer.h" 7 8 namespace node { 9 namespace http2 { 10 11 enum Http2SettingsIndex { 12 IDX_SETTINGS_HEADER_TABLE_SIZE, 13 IDX_SETTINGS_ENABLE_PUSH, 14 IDX_SETTINGS_INITIAL_WINDOW_SIZE, 15 IDX_SETTINGS_MAX_FRAME_SIZE, 16 IDX_SETTINGS_MAX_CONCURRENT_STREAMS, 17 IDX_SETTINGS_MAX_HEADER_LIST_SIZE, 18 IDX_SETTINGS_ENABLE_CONNECT_PROTOCOL, 19 IDX_SETTINGS_COUNT 20 }; 21 22 enum Http2SessionStateIndex { 23 IDX_SESSION_STATE_EFFECTIVE_LOCAL_WINDOW_SIZE, 24 IDX_SESSION_STATE_EFFECTIVE_RECV_DATA_LENGTH, 25 IDX_SESSION_STATE_NEXT_STREAM_ID, 26 IDX_SESSION_STATE_LOCAL_WINDOW_SIZE, 27 IDX_SESSION_STATE_LAST_PROC_STREAM_ID, 28 IDX_SESSION_STATE_REMOTE_WINDOW_SIZE, 29 IDX_SESSION_STATE_OUTBOUND_QUEUE_SIZE, 30 IDX_SESSION_STATE_HD_DEFLATE_DYNAMIC_TABLE_SIZE, 31 IDX_SESSION_STATE_HD_INFLATE_DYNAMIC_TABLE_SIZE, 32 IDX_SESSION_STATE_COUNT 33 }; 34 35 enum Http2StreamStateIndex { 36 IDX_STREAM_STATE, 37 IDX_STREAM_STATE_WEIGHT, 38 IDX_STREAM_STATE_SUM_DEPENDENCY_WEIGHT, 39 IDX_STREAM_STATE_LOCAL_CLOSE, 40 IDX_STREAM_STATE_REMOTE_CLOSE, 41 IDX_STREAM_STATE_LOCAL_WINDOW_SIZE, 42 IDX_STREAM_STATE_COUNT 43 }; 44 45 enum Http2OptionsIndex { 46 IDX_OPTIONS_MAX_DEFLATE_DYNAMIC_TABLE_SIZE, 47 IDX_OPTIONS_MAX_RESERVED_REMOTE_STREAMS, 48 IDX_OPTIONS_MAX_SEND_HEADER_BLOCK_LENGTH, 49 IDX_OPTIONS_PEER_MAX_CONCURRENT_STREAMS, 50 IDX_OPTIONS_PADDING_STRATEGY, 51 IDX_OPTIONS_MAX_HEADER_LIST_PAIRS, 52 IDX_OPTIONS_MAX_OUTSTANDING_PINGS, 53 IDX_OPTIONS_MAX_OUTSTANDING_SETTINGS, 54 IDX_OPTIONS_MAX_SESSION_MEMORY, 55 IDX_OPTIONS_MAX_SETTINGS, 56 IDX_OPTIONS_FLAGS 57 }; 58 59 enum Http2PaddingBufferFields { 60 PADDING_BUF_FRAME_LENGTH, 61 PADDING_BUF_MAX_PAYLOAD_LENGTH, 62 PADDING_BUF_RETURN_VALUE, 63 PADDING_BUF_FIELD_COUNT 64 }; 65 66 enum Http2StreamStatisticsIndex { 67 IDX_STREAM_STATS_ID, 68 IDX_STREAM_STATS_TIMETOFIRSTBYTE, 69 IDX_STREAM_STATS_TIMETOFIRSTHEADER, 70 IDX_STREAM_STATS_TIMETOFIRSTBYTESENT, 71 IDX_STREAM_STATS_SENTBYTES, 72 IDX_STREAM_STATS_RECEIVEDBYTES, 73 IDX_STREAM_STATS_COUNT 74 }; 75 76 enum Http2SessionStatisticsIndex { 77 IDX_SESSION_STATS_TYPE, 78 IDX_SESSION_STATS_PINGRTT, 79 IDX_SESSION_STATS_FRAMESRECEIVED, 80 IDX_SESSION_STATS_FRAMESSENT, 81 IDX_SESSION_STATS_STREAMCOUNT, 82 IDX_SESSION_STATS_STREAMAVERAGEDURATION, 83 IDX_SESSION_STATS_DATA_SENT, 84 IDX_SESSION_STATS_DATA_RECEIVED, 85 IDX_SESSION_STATS_MAX_CONCURRENT_STREAMS, 86 IDX_SESSION_STATS_COUNT 87 }; 88 89 class Http2State { 90 public: 91 explicit Http2State(v8::Isolate* isolate) : 92 root_buffer( 93 isolate, 94 sizeof(http2_state_internal)), 95 session_state_buffer( 96 isolate, 97 offsetof(http2_state_internal, session_state_buffer), 98 IDX_SESSION_STATE_COUNT, 99 root_buffer), 100 stream_state_buffer( 101 isolate, 102 offsetof(http2_state_internal, stream_state_buffer), 103 IDX_STREAM_STATE_COUNT, 104 root_buffer), 105 stream_stats_buffer( 106 isolate, 107 offsetof(http2_state_internal, stream_stats_buffer), 108 IDX_STREAM_STATS_COUNT, 109 root_buffer), 110 session_stats_buffer( 111 isolate, 112 offsetof(http2_state_internal, session_stats_buffer), 113 IDX_SESSION_STATS_COUNT, 114 root_buffer), 115 padding_buffer( 116 isolate, 117 offsetof(http2_state_internal, padding_buffer), 118 PADDING_BUF_FIELD_COUNT, 119 root_buffer), 120 options_buffer( 121 isolate, 122 offsetof(http2_state_internal, options_buffer), 123 IDX_OPTIONS_FLAGS + 1, 124 root_buffer), 125 settings_buffer( 126 isolate, 127 offsetof(http2_state_internal, settings_buffer), 128 IDX_SETTINGS_COUNT + 1, 129 root_buffer) { 130 } 131 132 AliasedUint8Array root_buffer; 133 AliasedFloat64Array session_state_buffer; 134 AliasedFloat64Array stream_state_buffer; 135 AliasedFloat64Array stream_stats_buffer; 136 AliasedFloat64Array session_stats_buffer; 137 AliasedUint32Array padding_buffer; 138 AliasedUint32Array options_buffer; 139 AliasedUint32Array settings_buffer; 140 141 private: 142 struct http2_state_internal { 143 // doubles first so that they are always sizeof(double)-aligned 144 double session_state_buffer[IDX_SESSION_STATE_COUNT]; 145 double stream_state_buffer[IDX_STREAM_STATE_COUNT]; 146 double stream_stats_buffer[IDX_STREAM_STATS_COUNT]; 147 double session_stats_buffer[IDX_SESSION_STATS_COUNT]; 148 uint32_t padding_buffer[PADDING_BUF_FIELD_COUNT]; 149 uint32_t options_buffer[IDX_OPTIONS_FLAGS + 1]; 150 uint32_t settings_buffer[IDX_SETTINGS_COUNT + 1]; 151 }; 152 }; 153 154 } // namespace http2 155 } // namespace node 156 157 #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS 158 159 #endif // SRC_NODE_HTTP2_STATE_H_
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2024 MyWebUniversity.com ™