57 #ifndef SPDY_MICROSPDY_H
58 #define SPDY_MICROSPDY_H
73 #ifndef MHD_PLATFORM_H
81 #include <sys/types.h>
82 #include <sys/socket.h>
102 #define SPDY_INPUT_ERROR -1
107 #define SPDY_VERSION 3
114 #define SPDY_MAX_SUPPORTED_FRAME_SIZE 8192
119 #define SPDY_HTTP_CONTINUE 100
120 #define SPDY_HTTP_SWITCHING_PROTOCOLS 101
121 #define SPDY_HTTP_PROCESSING 102
123 #define SPDY_HTTP_OK 200
124 #define SPDY_HTTP_CREATED 201
125 #define SPDY_HTTP_ACCEPTED 202
126 #define SPDY_HTTP_NON_AUTHORITATIVE_INFORMATION 203
127 #define SPDY_HTTP_NO_CONTENT 204
128 #define SPDY_HTTP_RESET_CONTENT 205
129 #define SPDY_HTTP_PARTIAL_CONTENT 206
130 #define SPDY_HTTP_MULTI_STATUS 207
132 #define SPDY_HTTP_MULTIPLE_CHOICES 300
133 #define SPDY_HTTP_MOVED_PERMANENTLY 301
134 #define SPDY_HTTP_FOUND 302
135 #define SPDY_HTTP_SEE_OTHER 303
136 #define SPDY_HTTP_NOT_MODIFIED 304
137 #define SPDY_HTTP_USE_PROXY 305
138 #define SPDY_HTTP_SWITCH_PROXY 306
139 #define SPDY_HTTP_TEMPORARY_REDIRECT 307
141 #define SPDY_HTTP_BAD_REQUEST 400
142 #define SPDY_HTTP_UNAUTHORIZED 401
143 #define SPDY_HTTP_PAYMENT_REQUIRED 402
144 #define SPDY_HTTP_FORBIDDEN 403
145 #define SPDY_HTTP_NOT_FOUND 404
146 #define SPDY_HTTP_METHOD_NOT_ALLOWED 405
147 #define SPDY_HTTP_METHOD_NOT_ACCEPTABLE 406
148 #define SPDY_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
149 #define SPDY_HTTP_REQUEST_TIMEOUT 408
150 #define SPDY_HTTP_CONFLICT 409
151 #define SPDY_HTTP_GONE 410
152 #define SPDY_HTTP_LENGTH_REQUIRED 411
153 #define SPDY_HTTP_PRECONDITION_FAILED 412
154 #define SPDY_HTTP_REQUEST_ENTITY_TOO_LARGE 413
155 #define SPDY_HTTP_REQUEST_URI_TOO_LONG 414
156 #define SPDY_HTTP_UNSUPPORTED_MEDIA_TYPE 415
157 #define SPDY_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE 416
158 #define SPDY_HTTP_EXPECTATION_FAILED 417
159 #define SPDY_HTTP_UNPROCESSABLE_ENTITY 422
160 #define SPDY_HTTP_LOCKED 423
161 #define SPDY_HTTP_FAILED_DEPENDENCY 424
162 #define SPDY_HTTP_UNORDERED_COLLECTION 425
163 #define SPDY_HTTP_UPGRADE_REQUIRED 426
164 #define SPDY_HTTP_NO_RESPONSE 444
165 #define SPDY_HTTP_RETRY_WITH 449
166 #define SPDY_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
167 #define SPDY_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
169 #define SPDY_HTTP_INTERNAL_SERVER_ERROR 500
170 #define SPDY_HTTP_NOT_IMPLEMENTED 501
171 #define SPDY_HTTP_BAD_GATEWAY 502
172 #define SPDY_HTTP_SERVICE_UNAVAILABLE 503
173 #define SPDY_HTTP_GATEWAY_TIMEOUT 504
174 #define SPDY_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
175 #define SPDY_HTTP_VARIANT_ALSO_NEGOTIATES 506
176 #define SPDY_HTTP_INSUFFICIENT_STORAGE 507
177 #define SPDY_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
178 #define SPDY_HTTP_NOT_EXTENDED 510
184 #define SPDY_HTTP_HEADER_ACCEPT "accept"
185 #define SPDY_HTTP_HEADER_ACCEPT_CHARSET "accept-charset"
186 #define SPDY_HTTP_HEADER_ACCEPT_ENCODING "accept-encoding"
187 #define SPDY_HTTP_HEADER_ACCEPT_LANGUAGE "accept-language"
188 #define SPDY_HTTP_HEADER_ACCEPT_RANGES "accept-ranges"
189 #define SPDY_HTTP_HEADER_AGE "age"
190 #define SPDY_HTTP_HEADER_ALLOW "allow"
191 #define SPDY_HTTP_HEADER_AUTHORIZATION "authorization"
192 #define SPDY_HTTP_HEADER_CACHE_CONTROL "cache-control"
194 #define SPDY_HTTP_HEADER_CONNECTION "connection"
195 #define SPDY_HTTP_HEADER_CONTENT_ENCODING "content-encoding"
196 #define SPDY_HTTP_HEADER_CONTENT_LANGUAGE "content-language"
197 #define SPDY_HTTP_HEADER_CONTENT_LENGTH "content-length"
198 #define SPDY_HTTP_HEADER_CONTENT_LOCATION "content-location"
199 #define SPDY_HTTP_HEADER_CONTENT_MD5 "content-md5"
200 #define SPDY_HTTP_HEADER_CONTENT_RANGE "content-range"
201 #define SPDY_HTTP_HEADER_CONTENT_TYPE "content-type"
202 #define SPDY_HTTP_HEADER_COOKIE "cookie"
203 #define SPDY_HTTP_HEADER_DATE "date"
204 #define SPDY_HTTP_HEADER_ETAG "etag"
205 #define SPDY_HTTP_HEADER_EXPECT "expect"
206 #define SPDY_HTTP_HEADER_EXPIRES "expires"
207 #define SPDY_HTTP_HEADER_FROM "from"
209 #define SPDY_HTTP_HEADER_HOST "host"
210 #define SPDY_HTTP_HEADER_IF_MATCH "if-match"
211 #define SPDY_HTTP_HEADER_IF_MODIFIED_SINCE "if-modified-since"
212 #define SPDY_HTTP_HEADER_IF_NONE_MATCH "if-none-match"
213 #define SPDY_HTTP_HEADER_IF_RANGE "if-range"
214 #define SPDY_HTTP_HEADER_IF_UNMODIFIED_SINCE "if-unmodified-since"
216 #define SPDY_HTTP_HEADER_KEEP_ALIVE "keep-alive"
217 #define SPDY_HTTP_HEADER_LAST_MODIFIED "last-modified"
218 #define SPDY_HTTP_HEADER_LOCATION "location"
219 #define SPDY_HTTP_HEADER_MAX_FORWARDS "max-forwards"
220 #define SPDY_HTTP_HEADER_PRAGMA "pragma"
221 #define SPDY_HTTP_HEADER_PROXY_AUTHENTICATE "proxy-authenticate"
222 #define SPDY_HTTP_HEADER_PROXY_AUTHORIZATION "proxy-authorization"
224 #define SPDY_HTTP_HEADER_PROXY_CONNECTION "proxy-connection"
225 #define SPDY_HTTP_HEADER_RANGE "range"
226 #define SPDY_HTTP_HEADER_REFERER "referer"
227 #define SPDY_HTTP_HEADER_RETRY_AFTER "retry-after"
228 #define SPDY_HTTP_HEADER_SERVER "server"
229 #define SPDY_HTTP_HEADER_SET_COOKIE "set-cookie"
230 #define SPDY_HTTP_HEADER_SET_COOKIE2 "set-cookie2"
231 #define SPDY_HTTP_HEADER_TE "te"
232 #define SPDY_HTTP_HEADER_TRAILER "trailer"
234 #define SPDY_HTTP_HEADER_TRANSFER_ENCODING "transfer-encoding"
235 #define SPDY_HTTP_HEADER_UPGRADE "upgrade"
236 #define SPDY_HTTP_HEADER_USER_AGENT "user-agent"
237 #define SPDY_HTTP_HEADER_VARY "vary"
238 #define SPDY_HTTP_HEADER_VIA "via"
239 #define SPDY_HTTP_HEADER_WARNING "warning"
240 #define SPDY_HTTP_HEADER_WWW_AUTHENTICATE "www-authenticate"
245 #define SPDY_HTTP_VERSION_1_0 "HTTP/1.0"
246 #define SPDY_HTTP_VERSION_1_1 "HTTP/1.1"
251 #define SPDY_HTTP_METHOD_CONNECT "CONNECT"
252 #define SPDY_HTTP_METHOD_DELETE "DELETE"
253 #define SPDY_HTTP_METHOD_GET "GET"
254 #define SPDY_HTTP_METHOD_HEAD "HEAD"
255 #define SPDY_HTTP_METHOD_OPTIONS "OPTIONS"
256 #define SPDY_HTTP_METHOD_POST "POST"
257 #define SPDY_HTTP_METHOD_PUT "PUT"
258 #define SPDY_HTTP_METHOD_TRACE "TRACE"
264 #define SPDY_HTTP_POST_ENCODING_FORM_URLENCODED "application/x-www-form-urlencoded"
265 #define SPDY_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data"
306 struct SPDY_Settings;
590 const char * reason);
635 const char *
const * value,
763 struct timeval * rtt);
796 struct SPDY_Settings * settings,
819 #define SPDY_init() SPDY_init(SPDY_IO_SUBSYSTEM_OPENSSL)
918 fd_set * read_fd_set,
919 fd_set * write_fd_set,
920 fd_set * except_fd_set);
936 unsigned long long * timeout);
997 struct sockaddr ** addr);
1027 const char * value);
1039 const char *
const *
1057 void *iterator_cls);
1137 const char * statustext,
1138 const char * version,
1177 const char * statustext,
1178 const char * version,
1182 uint32_t block_size);
1217 bool consider_priority,
1247 const struct SPDY_Settings *
1301 void * iterator_cls);
1335 struct SPDY_Settings * settings,