1import { IEnumMap } from './utils'; 2export declare type HTTPMode = 'loose' | 'strict'; 3export declare enum ERROR { 4 OK = 0, 5 INTERNAL = 1, 6 STRICT = 2, 7 LF_EXPECTED = 3, 8 UNEXPECTED_CONTENT_LENGTH = 4, 9 CLOSED_CONNECTION = 5, 10 INVALID_METHOD = 6, 11 INVALID_URL = 7, 12 INVALID_CONSTANT = 8, 13 INVALID_VERSION = 9, 14 INVALID_HEADER_TOKEN = 10, 15 INVALID_CONTENT_LENGTH = 11, 16 INVALID_CHUNK_SIZE = 12, 17 INVALID_STATUS = 13, 18 INVALID_EOF_STATE = 14, 19 INVALID_TRANSFER_ENCODING = 15, 20 CB_MESSAGE_BEGIN = 16, 21 CB_HEADERS_COMPLETE = 17, 22 CB_MESSAGE_COMPLETE = 18, 23 CB_CHUNK_HEADER = 19, 24 CB_CHUNK_COMPLETE = 20, 25 PAUSED = 21, 26 PAUSED_UPGRADE = 22, 27 PAUSED_H2_UPGRADE = 23, 28 USER = 24 29} 30export declare enum TYPE { 31 BOTH = 0, 32 REQUEST = 1, 33 RESPONSE = 2 34} 35export declare enum FLAGS { 36 CONNECTION_KEEP_ALIVE = 1, 37 CONNECTION_CLOSE = 2, 38 CONNECTION_UPGRADE = 4, 39 CHUNKED = 8, 40 UPGRADE = 16, 41 CONTENT_LENGTH = 32, 42 SKIPBODY = 64, 43 TRAILING = 128, 44 TRANSFER_ENCODING = 512 45} 46export declare enum LENIENT_FLAGS { 47 HEADERS = 1, 48 CHUNKED_LENGTH = 2, 49 KEEP_ALIVE = 4 50} 51export declare enum METHODS { 52 DELETE = 0, 53 GET = 1, 54 HEAD = 2, 55 POST = 3, 56 PUT = 4, 57 CONNECT = 5, 58 OPTIONS = 6, 59 TRACE = 7, 60 COPY = 8, 61 LOCK = 9, 62 MKCOL = 10, 63 MOVE = 11, 64 PROPFIND = 12, 65 PROPPATCH = 13, 66 SEARCH = 14, 67 UNLOCK = 15, 68 BIND = 16, 69 REBIND = 17, 70 UNBIND = 18, 71 ACL = 19, 72 REPORT = 20, 73 MKACTIVITY = 21, 74 CHECKOUT = 22, 75 MERGE = 23, 76 'M-SEARCH' = 24, 77 NOTIFY = 25, 78 SUBSCRIBE = 26, 79 UNSUBSCRIBE = 27, 80 PATCH = 28, 81 PURGE = 29, 82 MKCALENDAR = 30, 83 LINK = 31, 84 UNLINK = 32, 85 SOURCE = 33, 86 PRI = 34, 87 DESCRIBE = 35, 88 ANNOUNCE = 36, 89 SETUP = 37, 90 PLAY = 38, 91 PAUSE = 39, 92 TEARDOWN = 40, 93 GET_PARAMETER = 41, 94 SET_PARAMETER = 42, 95 REDIRECT = 43, 96 RECORD = 44, 97 FLUSH = 45 98} 99export declare const METHODS_HTTP: METHODS[]; 100export declare const METHODS_ICE: METHODS[]; 101export declare const METHODS_RTSP: METHODS[]; 102export declare const METHOD_MAP: IEnumMap; 103export declare const H_METHOD_MAP: IEnumMap; 104export declare enum FINISH { 105 SAFE = 0, 106 SAFE_WITH_CB = 1, 107 UNSAFE = 2 108} 109export declare type CharList = Array<string | number>; 110export declare const ALPHA: CharList; 111export declare const NUM_MAP: { 112 0: number; 113 1: number; 114 2: number; 115 3: number; 116 4: number; 117 5: number; 118 6: number; 119 7: number; 120 8: number; 121 9: number; 122}; 123export declare const HEX_MAP: { 124 0: number; 125 1: number; 126 2: number; 127 3: number; 128 4: number; 129 5: number; 130 6: number; 131 7: number; 132 8: number; 133 9: number; 134 A: number; 135 B: number; 136 C: number; 137 D: number; 138 E: number; 139 F: number; 140 a: number; 141 b: number; 142 c: number; 143 d: number; 144 e: number; 145 f: number; 146}; 147export declare const NUM: CharList; 148export declare const ALPHANUM: CharList; 149export declare const MARK: CharList; 150export declare const USERINFO_CHARS: CharList; 151export declare const STRICT_URL_CHAR: CharList; 152export declare const URL_CHAR: CharList; 153export declare const HEX: CharList; 154export declare const STRICT_TOKEN: CharList; 155export declare const TOKEN: CharList; 156export declare const HEADER_CHARS: CharList; 157export declare const CONNECTION_TOKEN_CHARS: CharList; 158export declare const MAJOR: { 159 0: number; 160 1: number; 161 2: number; 162 3: number; 163 4: number; 164 5: number; 165 6: number; 166 7: number; 167 8: number; 168 9: number; 169}; 170export declare const MINOR: { 171 0: number; 172 1: number; 173 2: number; 174 3: number; 175 4: number; 176 5: number; 177 6: number; 178 7: number; 179 8: number; 180 9: number; 181}; 182export declare enum HEADER_STATE { 183 GENERAL = 0, 184 CONNECTION = 1, 185 CONTENT_LENGTH = 2, 186 TRANSFER_ENCODING = 3, 187 UPGRADE = 4, 188 CONNECTION_KEEP_ALIVE = 5, 189 CONNECTION_CLOSE = 6, 190 CONNECTION_UPGRADE = 7, 191 TRANSFER_ENCODING_CHUNKED = 8 192} 193export declare const SPECIAL_HEADERS: { 194 connection: HEADER_STATE; 195 'content-length': HEADER_STATE; 196 'proxy-connection': HEADER_STATE; 197 'transfer-encoding': HEADER_STATE; 198 upgrade: HEADER_STATE; 199}; 200