48 #ifndef SPDY_MICROSPDY_H
49 #define SPDY_MICROSPDY_H
64 #ifndef MHD_PLATFORM_H
72 #include <sys/types.h>
73 #include <sys/socket.h>
93 #define SPDY_INPUT_ERROR -1
98 #define SPDY_VERSION 3
105 #define SPDY_MAX_SUPPORTED_FRAME_SIZE 8192
110 #define SPDY_HTTP_CONTINUE 100
111 #define SPDY_HTTP_SWITCHING_PROTOCOLS 101
112 #define SPDY_HTTP_PROCESSING 102
114 #define SPDY_HTTP_OK 200
115 #define SPDY_HTTP_CREATED 201
116 #define SPDY_HTTP_ACCEPTED 202
117 #define SPDY_HTTP_NON_AUTHORITATIVE_INFORMATION 203
118 #define SPDY_HTTP_NO_CONTENT 204
119 #define SPDY_HTTP_RESET_CONTENT 205
120 #define SPDY_HTTP_PARTIAL_CONTENT 206
121 #define SPDY_HTTP_MULTI_STATUS 207
123 #define SPDY_HTTP_MULTIPLE_CHOICES 300
124 #define SPDY_HTTP_MOVED_PERMANENTLY 301
125 #define SPDY_HTTP_FOUND 302
126 #define SPDY_HTTP_SEE_OTHER 303
127 #define SPDY_HTTP_NOT_MODIFIED 304
128 #define SPDY_HTTP_USE_PROXY 305
129 #define SPDY_HTTP_SWITCH_PROXY 306
130 #define SPDY_HTTP_TEMPORARY_REDIRECT 307
132 #define SPDY_HTTP_BAD_REQUEST 400
133 #define SPDY_HTTP_UNAUTHORIZED 401
134 #define SPDY_HTTP_PAYMENT_REQUIRED 402
135 #define SPDY_HTTP_FORBIDDEN 403
136 #define SPDY_HTTP_NOT_FOUND 404
137 #define SPDY_HTTP_METHOD_NOT_ALLOWED 405
138 #define SPDY_HTTP_METHOD_NOT_ACCEPTABLE 406
139 #define SPDY_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
140 #define SPDY_HTTP_REQUEST_TIMEOUT 408
141 #define SPDY_HTTP_CONFLICT 409
142 #define SPDY_HTTP_GONE 410
143 #define SPDY_HTTP_LENGTH_REQUIRED 411
144 #define SPDY_HTTP_PRECONDITION_FAILED 412
145 #define SPDY_HTTP_REQUEST_ENTITY_TOO_LARGE 413
146 #define SPDY_HTTP_REQUEST_URI_TOO_LONG 414
147 #define SPDY_HTTP_UNSUPPORTED_MEDIA_TYPE 415
148 #define SPDY_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE 416
149 #define SPDY_HTTP_EXPECTATION_FAILED 417
150 #define SPDY_HTTP_UNPROCESSABLE_ENTITY 422
151 #define SPDY_HTTP_LOCKED 423
152 #define SPDY_HTTP_FAILED_DEPENDENCY 424
153 #define SPDY_HTTP_UNORDERED_COLLECTION 425
154 #define SPDY_HTTP_UPGRADE_REQUIRED 426
155 #define SPDY_HTTP_NO_RESPONSE 444
156 #define SPDY_HTTP_RETRY_WITH 449
157 #define SPDY_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
158 #define SPDY_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
160 #define SPDY_HTTP_INTERNAL_SERVER_ERROR 500
161 #define SPDY_HTTP_NOT_IMPLEMENTED 501
162 #define SPDY_HTTP_BAD_GATEWAY 502
163 #define SPDY_HTTP_SERVICE_UNAVAILABLE 503
164 #define SPDY_HTTP_GATEWAY_TIMEOUT 504
165 #define SPDY_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
166 #define SPDY_HTTP_VARIANT_ALSO_NEGOTIATES 506
167 #define SPDY_HTTP_INSUFFICIENT_STORAGE 507
168 #define SPDY_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
169 #define SPDY_HTTP_NOT_EXTENDED 510
175 #define SPDY_HTTP_HEADER_ACCEPT "accept"
176 #define SPDY_HTTP_HEADER_ACCEPT_CHARSET "accept-charset"
177 #define SPDY_HTTP_HEADER_ACCEPT_ENCODING "accept-encoding"
178 #define SPDY_HTTP_HEADER_ACCEPT_LANGUAGE "accept-language"
179 #define SPDY_HTTP_HEADER_ACCEPT_RANGES "accept-ranges"
180 #define SPDY_HTTP_HEADER_AGE "age"
181 #define SPDY_HTTP_HEADER_ALLOW "allow"
182 #define SPDY_HTTP_HEADER_AUTHORIZATION "authorization"
183 #define SPDY_HTTP_HEADER_CACHE_CONTROL "cache-control"
185 #define SPDY_HTTP_HEADER_CONNECTION "connection"
186 #define SPDY_HTTP_HEADER_CONTENT_ENCODING "content-encoding"
187 #define SPDY_HTTP_HEADER_CONTENT_LANGUAGE "content-language"
188 #define SPDY_HTTP_HEADER_CONTENT_LENGTH "content-length"
189 #define SPDY_HTTP_HEADER_CONTENT_LOCATION "content-location"
190 #define SPDY_HTTP_HEADER_CONTENT_MD5 "content-md5"
191 #define SPDY_HTTP_HEADER_CONTENT_RANGE "content-range"
192 #define SPDY_HTTP_HEADER_CONTENT_TYPE "content-type"
193 #define SPDY_HTTP_HEADER_COOKIE "cookie"
194 #define SPDY_HTTP_HEADER_DATE "date"
195 #define SPDY_HTTP_HEADER_ETAG "etag"
196 #define SPDY_HTTP_HEADER_EXPECT "expect"
197 #define SPDY_HTTP_HEADER_EXPIRES "expires"
198 #define SPDY_HTTP_HEADER_FROM "from"
200 #define SPDY_HTTP_HEADER_HOST "host"
201 #define SPDY_HTTP_HEADER_IF_MATCH "if-match"
202 #define SPDY_HTTP_HEADER_IF_MODIFIED_SINCE "if-modified-since"
203 #define SPDY_HTTP_HEADER_IF_NONE_MATCH "if-none-match"
204 #define SPDY_HTTP_HEADER_IF_RANGE "if-range"
205 #define SPDY_HTTP_HEADER_IF_UNMODIFIED_SINCE "if-unmodified-since"
207 #define SPDY_HTTP_HEADER_KEEP_ALIVE "keep-alive"
208 #define SPDY_HTTP_HEADER_LAST_MODIFIED "last-modified"
209 #define SPDY_HTTP_HEADER_LOCATION "location"
210 #define SPDY_HTTP_HEADER_MAX_FORWARDS "max-forwards"
211 #define SPDY_HTTP_HEADER_PRAGMA "pragma"
212 #define SPDY_HTTP_HEADER_PROXY_AUTHENTICATE "proxy-authenticate"
213 #define SPDY_HTTP_HEADER_PROXY_AUTHORIZATION "proxy-authorization"
215 #define SPDY_HTTP_HEADER_PROXY_CONNECTION "proxy-connection"
216 #define SPDY_HTTP_HEADER_RANGE "range"
217 #define SPDY_HTTP_HEADER_REFERER "referer"
218 #define SPDY_HTTP_HEADER_RETRY_AFTER "retry-after"
219 #define SPDY_HTTP_HEADER_SERVER "server"
220 #define SPDY_HTTP_HEADER_SET_COOKIE "set-cookie"
221 #define SPDY_HTTP_HEADER_SET_COOKIE2 "set-cookie2"
222 #define SPDY_HTTP_HEADER_TE "te"
223 #define SPDY_HTTP_HEADER_TRAILER "trailer"
225 #define SPDY_HTTP_HEADER_TRANSFER_ENCODING "transfer-encoding"
226 #define SPDY_HTTP_HEADER_UPGRADE "upgrade"
227 #define SPDY_HTTP_HEADER_USER_AGENT "user-agent"
228 #define SPDY_HTTP_HEADER_VARY "vary"
229 #define SPDY_HTTP_HEADER_VIA "via"
230 #define SPDY_HTTP_HEADER_WARNING "warning"
231 #define SPDY_HTTP_HEADER_WWW_AUTHENTICATE "www-authenticate"
236 #define SPDY_HTTP_VERSION_1_0 "HTTP/1.0"
237 #define SPDY_HTTP_VERSION_1_1 "HTTP/1.1"
242 #define SPDY_HTTP_METHOD_CONNECT "CONNECT"
243 #define SPDY_HTTP_METHOD_DELETE "DELETE"
244 #define SPDY_HTTP_METHOD_GET "GET"
245 #define SPDY_HTTP_METHOD_HEAD "HEAD"
246 #define SPDY_HTTP_METHOD_OPTIONS "OPTIONS"
247 #define SPDY_HTTP_METHOD_POST "POST"
248 #define SPDY_HTTP_METHOD_PUT "PUT"
249 #define SPDY_HTTP_METHOD_TRACE "TRACE"
255 #define SPDY_HTTP_POST_ENCODING_FORM_URLENCODED "application/x-www-form-urlencoded"
256 #define SPDY_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data"
283 struct SPDY_Response;
290 struct SPDY_NameValue;
297 struct SPDY_Settings;
581 const char * reason);
593 struct SPDY_Session * session);
610 struct SPDY_Session * session,
626 const char *
const * value,
647 struct SPDY_Request * request,
651 const char * version,
654 struct SPDY_NameValue * headers);
672 struct SPDY_Request *request,
726 struct SPDY_Response * response,
727 struct SPDY_Request * request,
741 struct SPDY_Session * session,
742 struct timeval * rtt);
775 struct SPDY_Settings * settings,
798 #define SPDY_init() SPDY_init(SPDY_IO_SUBSYSTEM_OPENSSL)
853 const char * certfile,
854 const char * keyfile,
897 fd_set * read_fd_set,
898 fd_set * write_fd_set,
899 fd_set * except_fd_set);
915 unsigned long long * timeout);
925 SPDY_run (
struct SPDY_Daemon *daemon);
976 struct sockaddr ** addr);
989 struct SPDY_NameValue *
1006 const char * value);
1018 const char *
const *
1036 void *iterator_cls);
1059 struct SPDY_Session *
1114 struct SPDY_Response *
1116 const char * statustext,
1117 const char * version,
1118 struct SPDY_NameValue * headers,
1154 struct SPDY_Response *
1156 const char * statustext,
1157 const char * version,
1158 struct SPDY_NameValue * headers,
1161 uint32_t block_size);
1194 struct SPDY_Response *response,
1196 bool consider_priority,
1226 const struct SPDY_Settings *
1280 void * iterator_cls);
1314 struct SPDY_Settings * settings,