GNU libmicrohttpd  0.9.29
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
microspdy.h
Go to the documentation of this file.
1 /*
2  This file is part of libmicrospdy
3  Copyright (C) 2012, 2013 Christian Grothoff
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
57 #ifndef SPDY_MICROSPDY_H
58 #define SPDY_MICROSPDY_H
59 
60 #include <zlib.h>
61 #include <stdbool.h>
62 
63 /* While we generally would like users to use a configure-driven
64  build process which detects which headers are present and
65  hence works on any platform, we use "standard" includes here
66  to build out-of-the-box for beginning users on common systems.
67 
68  Once you have a proper build system and go for more exotic
69  platforms, you should define MHD_PLATFORM_H in some header that
70  you always include *before* "microhttpd.h". Then the following
71  "standard" includes won't be used (which might be a good
72  idea, especially on platforms where they do not exist). */
73 #ifndef MHD_PLATFORM_H
74 #include <unistd.h>
75 #include <stdarg.h>
76 #include <stdint.h>
77 #ifdef __MINGW32__
78 #include <ws2tcpip.h>
79 #else
80 #include <sys/time.h>
81 #include <sys/types.h>
82 #include <sys/socket.h>
83 #endif
84 #endif
85 
86 #ifndef _MHD_EXTERN
87 #define _MHD_EXTERN extern
88 #endif
89 
93 #define SPDY_YES 1
94 
98 #define SPDY_NO 0
99 
105 #define SPDY_INPUT_ERROR -1
106 
110 #define SPDY_VERSION 3
111 
117 #define SPDY_MAX_SUPPORTED_FRAME_SIZE 8192
118 
122 #define SPDY_HTTP_CONTINUE 100
123 #define SPDY_HTTP_SWITCHING_PROTOCOLS 101
124 #define SPDY_HTTP_PROCESSING 102
125 
126 #define SPDY_HTTP_OK 200
127 #define SPDY_HTTP_CREATED 201
128 #define SPDY_HTTP_ACCEPTED 202
129 #define SPDY_HTTP_NON_AUTHORITATIVE_INFORMATION 203
130 #define SPDY_HTTP_NO_CONTENT 204
131 #define SPDY_HTTP_RESET_CONTENT 205
132 #define SPDY_HTTP_PARTIAL_CONTENT 206
133 #define SPDY_HTTP_MULTI_STATUS 207
134 
135 #define SPDY_HTTP_MULTIPLE_CHOICES 300
136 #define SPDY_HTTP_MOVED_PERMANENTLY 301
137 #define SPDY_HTTP_FOUND 302
138 #define SPDY_HTTP_SEE_OTHER 303
139 #define SPDY_HTTP_NOT_MODIFIED 304
140 #define SPDY_HTTP_USE_PROXY 305
141 #define SPDY_HTTP_SWITCH_PROXY 306
142 #define SPDY_HTTP_TEMPORARY_REDIRECT 307
143 
144 #define SPDY_HTTP_BAD_REQUEST 400
145 #define SPDY_HTTP_UNAUTHORIZED 401
146 #define SPDY_HTTP_PAYMENT_REQUIRED 402
147 #define SPDY_HTTP_FORBIDDEN 403
148 #define SPDY_HTTP_NOT_FOUND 404
149 #define SPDY_HTTP_METHOD_NOT_ALLOWED 405
150 #define SPDY_HTTP_METHOD_NOT_ACCEPTABLE 406
151 #define SPDY_HTTP_PROXY_AUTHENTICATION_REQUIRED 407
152 #define SPDY_HTTP_REQUEST_TIMEOUT 408
153 #define SPDY_HTTP_CONFLICT 409
154 #define SPDY_HTTP_GONE 410
155 #define SPDY_HTTP_LENGTH_REQUIRED 411
156 #define SPDY_HTTP_PRECONDITION_FAILED 412
157 #define SPDY_HTTP_REQUEST_ENTITY_TOO_LARGE 413
158 #define SPDY_HTTP_REQUEST_URI_TOO_LONG 414
159 #define SPDY_HTTP_UNSUPPORTED_MEDIA_TYPE 415
160 #define SPDY_HTTP_REQUESTED_RANGE_NOT_SATISFIABLE 416
161 #define SPDY_HTTP_EXPECTATION_FAILED 417
162 #define SPDY_HTTP_UNPROCESSABLE_ENTITY 422
163 #define SPDY_HTTP_LOCKED 423
164 #define SPDY_HTTP_FAILED_DEPENDENCY 424
165 #define SPDY_HTTP_UNORDERED_COLLECTION 425
166 #define SPDY_HTTP_UPGRADE_REQUIRED 426
167 #define SPDY_HTTP_NO_RESPONSE 444
168 #define SPDY_HTTP_RETRY_WITH 449
169 #define SPDY_HTTP_BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS 450
170 #define SPDY_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
171 
172 #define SPDY_HTTP_INTERNAL_SERVER_ERROR 500
173 #define SPDY_HTTP_NOT_IMPLEMENTED 501
174 #define SPDY_HTTP_BAD_GATEWAY 502
175 #define SPDY_HTTP_SERVICE_UNAVAILABLE 503
176 #define SPDY_HTTP_GATEWAY_TIMEOUT 504
177 #define SPDY_HTTP_HTTP_VERSION_NOT_SUPPORTED 505
178 #define SPDY_HTTP_VARIANT_ALSO_NEGOTIATES 506
179 #define SPDY_HTTP_INSUFFICIENT_STORAGE 507
180 #define SPDY_HTTP_BANDWIDTH_LIMIT_EXCEEDED 509
181 #define SPDY_HTTP_NOT_EXTENDED 510
182 
187 #define SPDY_HTTP_HEADER_ACCEPT "accept"
188 #define SPDY_HTTP_HEADER_ACCEPT_CHARSET "accept-charset"
189 #define SPDY_HTTP_HEADER_ACCEPT_ENCODING "accept-encoding"
190 #define SPDY_HTTP_HEADER_ACCEPT_LANGUAGE "accept-language"
191 #define SPDY_HTTP_HEADER_ACCEPT_RANGES "accept-ranges"
192 #define SPDY_HTTP_HEADER_AGE "age"
193 #define SPDY_HTTP_HEADER_ALLOW "allow"
194 #define SPDY_HTTP_HEADER_AUTHORIZATION "authorization"
195 #define SPDY_HTTP_HEADER_CACHE_CONTROL "cache-control"
196 /* Connection header is forbidden in SPDY */
197 #define SPDY_HTTP_HEADER_CONNECTION "connection"
198 #define SPDY_HTTP_HEADER_CONTENT_ENCODING "content-encoding"
199 #define SPDY_HTTP_HEADER_CONTENT_LANGUAGE "content-language"
200 #define SPDY_HTTP_HEADER_CONTENT_LENGTH "content-length"
201 #define SPDY_HTTP_HEADER_CONTENT_LOCATION "content-location"
202 #define SPDY_HTTP_HEADER_CONTENT_MD5 "content-md5"
203 #define SPDY_HTTP_HEADER_CONTENT_RANGE "content-range"
204 #define SPDY_HTTP_HEADER_CONTENT_TYPE "content-type"
205 #define SPDY_HTTP_HEADER_COOKIE "cookie"
206 #define SPDY_HTTP_HEADER_DATE "date"
207 #define SPDY_HTTP_HEADER_ETAG "etag"
208 #define SPDY_HTTP_HEADER_EXPECT "expect"
209 #define SPDY_HTTP_HEADER_EXPIRES "expires"
210 #define SPDY_HTTP_HEADER_FROM "from"
211 /* Host header is forbidden in SPDY */
212 #define SPDY_HTTP_HEADER_HOST "host"
213 #define SPDY_HTTP_HEADER_IF_MATCH "if-match"
214 #define SPDY_HTTP_HEADER_IF_MODIFIED_SINCE "if-modified-since"
215 #define SPDY_HTTP_HEADER_IF_NONE_MATCH "if-none-match"
216 #define SPDY_HTTP_HEADER_IF_RANGE "if-range"
217 #define SPDY_HTTP_HEADER_IF_UNMODIFIED_SINCE "if-unmodified-since"
218 /* Keep-Alive header is forbidden in SPDY */
219 #define SPDY_HTTP_HEADER_KEEP_ALIVE "keep-alive"
220 #define SPDY_HTTP_HEADER_LAST_MODIFIED "last-modified"
221 #define SPDY_HTTP_HEADER_LOCATION "location"
222 #define SPDY_HTTP_HEADER_MAX_FORWARDS "max-forwards"
223 #define SPDY_HTTP_HEADER_PRAGMA "pragma"
224 #define SPDY_HTTP_HEADER_PROXY_AUTHENTICATE "proxy-authenticate"
225 #define SPDY_HTTP_HEADER_PROXY_AUTHORIZATION "proxy-authorization"
226 /* Proxy-Connection header is forbidden in SPDY */
227 #define SPDY_HTTP_HEADER_PROXY_CONNECTION "proxy-connection"
228 #define SPDY_HTTP_HEADER_RANGE "range"
229 #define SPDY_HTTP_HEADER_REFERER "referer"
230 #define SPDY_HTTP_HEADER_RETRY_AFTER "retry-after"
231 #define SPDY_HTTP_HEADER_SERVER "server"
232 #define SPDY_HTTP_HEADER_SET_COOKIE "set-cookie"
233 #define SPDY_HTTP_HEADER_SET_COOKIE2 "set-cookie2"
234 #define SPDY_HTTP_HEADER_TE "te"
235 #define SPDY_HTTP_HEADER_TRAILER "trailer"
236 /* Transfer-Encoding header is forbidden in SPDY */
237 #define SPDY_HTTP_HEADER_TRANSFER_ENCODING "transfer-encoding"
238 #define SPDY_HTTP_HEADER_UPGRADE "upgrade"
239 #define SPDY_HTTP_HEADER_USER_AGENT "user-agent"
240 #define SPDY_HTTP_HEADER_VARY "vary"
241 #define SPDY_HTTP_HEADER_VIA "via"
242 #define SPDY_HTTP_HEADER_WARNING "warning"
243 #define SPDY_HTTP_HEADER_WWW_AUTHENTICATE "www-authenticate"
244 
248 #define SPDY_HTTP_VERSION_1_0 "HTTP/1.0"
249 #define SPDY_HTTP_VERSION_1_1 "HTTP/1.1"
250 
254 #define SPDY_HTTP_METHOD_CONNECT "CONNECT"
255 #define SPDY_HTTP_METHOD_DELETE "DELETE"
256 #define SPDY_HTTP_METHOD_GET "GET"
257 #define SPDY_HTTP_METHOD_HEAD "HEAD"
258 #define SPDY_HTTP_METHOD_OPTIONS "OPTIONS"
259 #define SPDY_HTTP_METHOD_POST "POST"
260 #define SPDY_HTTP_METHOD_PUT "PUT"
261 #define SPDY_HTTP_METHOD_TRACE "TRACE"
262 
267 #define SPDY_HTTP_POST_ENCODING_FORM_URLENCODED "application/x-www-form-urlencoded"
268 #define SPDY_HTTP_POST_ENCODING_MULTIPART_FORMDATA "multipart/form-data"
269 
270 
274 struct SPDY_Daemon;
275 
276 
280 struct SPDY_Session;
281 
282 
287 struct SPDY_Request;
288 
289 
295 struct SPDY_Response;
296 
297 
302 struct SPDY_NameValue;
303 
304 
309 struct SPDY_Settings;
310 
311 
319 {
320 
325 
330 
335 };
336 
337 
347 {
348 
354 
361 
369 
375 
382 
394 };
395 
396 
402 {
407 
414 
420 };
421 
422 
428 {
429 
437 
445 
453 
461 
467 
473 
479 
485 };
486 
487 
494 {
495 
504 
513 };
514 
515 
521 {
522 
533 };
534 
535 
546 {
547 
553 };
554 
555 
562 {
563 
568 
573 
579 };
580 
581 
591 typedef void
592 (*SPDY_PanicCallback) (void * cls,
593  const char *file,
594  unsigned int line,
595  const char *reason);
596 
597 
605 typedef void
606 (*SPDY_NewSessionCallback) (void * cls,
607  struct SPDY_Session * session);
608 
609 
622 typedef void
624  struct SPDY_Session *session,
625  int by_client);
626 
627 
637 typedef int
639  const char *name,
640  const char * const * value,
641  int num_values);
642 
643 
669 typedef void
671  struct SPDY_Request *request,
672  uint8_t priority,
673  const char *method,
674  const char *path,
675  const char *version,
676  const char *host,
677  const char *scheme,
678  struct SPDY_NameValue *headers,
679  bool more);
680 
681 
697 typedef int
698 (*SPDY_NewDataCallback) (void *cls,
699  struct SPDY_Request *request,
700  const void *buf,
701  size_t size,
702  bool more);
703 // How about passing POST encoding information
704 // here as well?
705 //TODO
706 
707 
723 typedef ssize_t
724 (*SPDY_ResponseCallback) (void *cls,
725  void *buffer,
726  size_t max,
727  bool *more);
728 
729 
752 typedef void
754  struct SPDY_Response *response,
755  struct SPDY_Request *request,
756  enum SPDY_RESPONSE_RESULT status,
757  bool streamopened);
758 
759 
767 typedef void
768 (*SPDY_PingCallback) (void * cls,
769  struct SPDY_Session *session,
770  struct timeval *rtt);
771 
772 
784 typedef int
785 (*SPDY_SettingsIterator) (void *cls,
786  enum SPDY_SETTINGS id,
787  int32_t value,
788  uint8_t flags);
789 
790 
801 typedef void
803  struct SPDY_Settings *settings,
804  uint8_t flags,
805  ...);
806 
807 
808 /* Global functions for the library */
809 
810 
824 _MHD_EXTERN int
825 (SPDY_init) (enum SPDY_IO_SUBSYSTEM io_subsystem, ...);
826 #define SPDY_init() SPDY_init (SPDY_IO_SUBSYSTEM_OPENSSL)
827 
828 
834 _MHD_EXTERN void
835 SPDY_deinit (void);
836 
837 
853 _MHD_EXTERN void
855  void *cls);
856 
857 
858 /* Daemon functions */
859 
860 
879 _MHD_EXTERN struct SPDY_Daemon *
880 SPDY_start_daemon (uint16_t port,
881  const char *certfile,
882  const char *keyfile,
886  SPDY_NewDataCallback npdcb,
887  void *cls,
888  ...);
889 
890 
897 _MHD_EXTERN void
898 SPDY_stop_daemon (struct SPDY_Daemon *daemon);
899 
900 
923 _MHD_EXTERN int
924 SPDY_get_fdset (struct SPDY_Daemon *daemon,
925  fd_set *read_fd_set,
926  fd_set *write_fd_set,
927  fd_set *except_fd_set);
928 
929 
941 _MHD_EXTERN int
942 SPDY_get_timeout (struct SPDY_Daemon *daemon,
943  unsigned long long *timeout);
944 
945 
952 _MHD_EXTERN void
953 SPDY_run (struct SPDY_Daemon *daemon);
954 
955 
956 /* SPDY Session handling functions */
957 
958 
968 _MHD_EXTERN void
969 SPDY_close_session (struct SPDY_Session * session);
970 
971 
979 _MHD_EXTERN void
980 SPDY_set_cls_to_session (struct SPDY_Session *session,
981  void *cls);
982 
983 
991 _MHD_EXTERN void *
992 SPDY_get_cls_from_session (struct SPDY_Session *session);
993 
994 
1002 _MHD_EXTERN socklen_t
1003 SPDY_get_remote_addr (struct SPDY_Session *session,
1004  struct sockaddr **addr);
1005 
1006 
1007 /* SPDY name/value data structure handling functions */
1008 
1009 
1017 _MHD_EXTERN struct SPDY_NameValue *
1018 SPDY_name_value_create (void);
1019 
1020 
1031 _MHD_EXTERN int
1032 SPDY_name_value_add (struct SPDY_NameValue *container,
1033  const char *name,
1034  const char *value);
1035 
1036 
1046 _MHD_EXTERN const char * const *
1047 SPDY_name_value_lookup (struct SPDY_NameValue *container,
1048  const char *name,
1049  int *num_values);
1050 
1051 
1061 _MHD_EXTERN int
1062 SPDY_name_value_iterate (struct SPDY_NameValue *container,
1063  SPDY_NameValueIterator iterator,
1064  void *iterator_cls);
1065 
1066 
1073 _MHD_EXTERN void
1074 SPDY_name_value_destroy (struct SPDY_NameValue *container);
1075 
1076 
1077 /* SPDY request handling functions */
1078 
1079 
1087 _MHD_EXTERN struct SPDY_Session *
1088 SPDY_get_session_for_request (const struct SPDY_Request *request);
1089 
1090 
1098 _MHD_EXTERN void
1099 SPDY_set_cls_to_request (struct SPDY_Request *request,
1100  void *cls);
1101 
1102 
1111 _MHD_EXTERN void *
1112 SPDY_get_cls_from_request (struct SPDY_Request *request);
1113 
1114 
1115 /* SPDY response handling functions */
1116 
1117 
1142 _MHD_EXTERN struct SPDY_Response *
1143 SPDY_build_response (int status,
1144  const char *statustext,
1145  const char *version,
1146  struct SPDY_NameValue *headers,
1147  const void *data,
1148  size_t size);
1149 
1150 
1182 _MHD_EXTERN struct SPDY_Response *
1184  const char *statustext,
1185  const char *version,
1186  struct SPDY_NameValue *headers,
1188  void *rcb_cls,
1189  uint32_t block_size);
1190 
1191 
1220 _MHD_EXTERN int
1221 SPDY_queue_response (struct SPDY_Request *request,
1222  struct SPDY_Response *response,
1223  bool closestream,
1224  bool consider_priority,
1226  void *rrcb_cls);
1227 
1228 
1240 _MHD_EXTERN void
1241 SPDY_destroy_response (struct SPDY_Response *response);
1242 
1243 
1244 /* SPDY settings ID/value data structure handling functions */
1245 
1246 
1254 _MHD_EXTERN const struct SPDY_Settings *
1255 SPDY_settings_create (void);
1256 
1257 
1271 _MHD_EXTERN int
1272 SPDY_settings_add (struct SPDY_Settings *container,
1273  enum SPDY_SETTINGS id,
1274  enum SPDY_FLAG_SETTINGS flags,
1275  int32_t value);
1276 
1277 
1289 _MHD_EXTERN int
1290 SPDY_settings_lookup (const struct SPDY_Settings *container,
1291  enum SPDY_SETTINGS id,
1292  enum SPDY_FLAG_SETTINGS *flags,
1293  int32_t *value);
1294 
1295 
1305 _MHD_EXTERN int
1306 SPDY_settings_iterate (const struct SPDY_Settings *container,
1307  SPDY_SettingsIterator iterator,
1308  void *iterator_cls);
1309 
1310 
1318 _MHD_EXTERN void
1319 SPDY_settings_destroy (struct SPDY_Settings * container);
1320 
1321 
1322 /* SPDY SETTINGS handling functions */
1323 
1324 
1340 _MHD_EXTERN int
1341 SPDY_send_settings (struct SPDY_Session *session,
1342  struct SPDY_Settings *settings,
1343  enum SPDY_FLAG_SETTINGS_FRAME flags,
1344  ...);
1345 
1346 
1347 /* SPDY misc functions */
1348 
1349 
1362 _MHD_EXTERN void
1363 SPDY_destroy_request (struct SPDY_Request * request);
1364 
1365 
1375 _MHD_EXTERN int
1376 SPDY_send_ping (struct SPDY_Session *session,
1377  SPDY_PingCallback rttcb,
1378  void *rttcb_cls);
1379 
1380 #endif
_MHD_EXTERN void SPDY_settings_destroy(struct SPDY_Settings *container)
char * scheme
Definition: alstructures.h:70
uint16_t port
Definition: structures.h:996
int(* SPDY_SettingsIterator)(void *cls, enum SPDY_SETTINGS id, int32_t value, uint8_t flags)
Definition: microspdy.h:785
_MHD_EXTERN int SPDY_get_timeout(struct SPDY_Daemon *daemon, unsigned long long *timeout)
SPDY_DAEMON_OPTION
Definition: microspdy.h:346
_MHD_EXTERN int SPDY_settings_iterate(const struct SPDY_Settings *container, SPDY_SettingsIterator iterator, void *iterator_cls)
#define _MHD_EXTERN
Definition: microspdy.h:87
_MHD_EXTERN const struct SPDY_Settings * SPDY_settings_create(void)
_MHD_EXTERN struct SPDY_Response * SPDY_build_response_with_callback(int status, const char *statustext, const char *version, struct SPDY_NameValue *headers, SPDY_ResponseCallback rcb, void *rcb_cls, uint32_t block_size)
_MHD_EXTERN struct SPDY_Daemon * SPDY_start_daemon(uint16_t port, const char *certfile, const char *keyfile, SPDY_NewSessionCallback nscb, SPDY_SessionClosedCallback sccb, SPDY_NewRequestCallback nrcb, SPDY_NewDataCallback npdcb, void *cls,...)
_MHD_EXTERN int SPDY_name_value_add(struct SPDY_NameValue *container, const char *name, const char *value)
Definition: structures.c:56
_MHD_EXTERN int SPDY_settings_add(struct SPDY_Settings *container, enum SPDY_SETTINGS id, enum SPDY_FLAG_SETTINGS flags, int32_t value)
void(* SPDY_NewSessionCallback)(void *cls, struct SPDY_Session *session)
Definition: microspdy.h:606
char * method
Definition: alstructures.h:49
SPDY_SETTINGS_OPTION
Definition: microspdy.h:545
void(* SPDY_PanicCallback)(void *cls, const char *file, unsigned int line, const char *reason)
Definition: microspdy.h:592
_MHD_EXTERN int SPDY_send_settings(struct SPDY_Session *session, struct SPDY_Settings *settings, enum SPDY_FLAG_SETTINGS_FRAME flags,...)
void(* SPDY_NewRequestCallback)(void *cls, struct SPDY_Request *request, uint8_t priority, const char *method, const char *path, const char *version, const char *host, const char *scheme, struct SPDY_NameValue *headers, bool more)
Definition: microspdy.h:670
_MHD_EXTERN const char *const * SPDY_name_value_lookup(struct SPDY_NameValue *container, const char *name, int *num_values)
Definition: structures.c:190
SPDY_FLAG_SETTINGS_FRAME
Definition: microspdy.h:520
_MHD_EXTERN void SPDY_close_session(struct SPDY_Session *session)
_MHD_EXTERN void * SPDY_get_cls_from_session(struct SPDY_Session *session)
char * keyfile
Definition: structures.h:897
_MHD_EXTERN socklen_t SPDY_get_remote_addr(struct SPDY_Session *session, struct sockaddr **addr)
_MHD_EXTERN void SPDY_run(struct SPDY_Daemon *daemon)
SPDY_FLAG_SETTINGS
Definition: microspdy.h:493
_MHD_EXTERN void SPDY_stop_daemon(struct SPDY_Daemon *daemon)
_MHD_EXTERN struct SPDY_NameValue * SPDY_name_value_create(void)
Definition: structures.c:42
SPDY_ResponseCallback rcb
Definition: structures.h:1022
void(* SPDY_SettingsReceivedCallback)(struct SPDY_Session *session, struct SPDY_Settings *settings, uint8_t flags,...)
Definition: microspdy.h:802
_MHD_EXTERN void SPDY_destroy_response(struct SPDY_Response *response)
Definition: structures.c:279
void(* SPDY_SessionClosedCallback)(void *cls, struct SPDY_Session *session, int by_client)
Definition: microspdy.h:623
int(* SPDY_NameValueIterator)(void *cls, const char *name, const char *const *value, int num_values)
Definition: microspdy.h:638
void * rcb_cls
Definition: structures.h:1027
char * version
Definition: alstructures.h:60
unsigned int num_values
Definition: structures.h:512
void(* SPDY_ResponseResultCallback)(void *cls, struct SPDY_Response *response, struct SPDY_Request *request, enum SPDY_RESPONSE_RESULT status, bool streamopened)
Definition: microspdy.h:753
char * certfile
Definition: structures.h:891
_MHD_EXTERN void SPDY_destroy_request(struct SPDY_Request *request)
Definition: alstructures.c:30
int(* SPDY_NewDataCallback)(void *cls, struct SPDY_Request *request, const void *buf, size_t size, bool more)
Definition: microspdy.h:698
_MHD_EXTERN void SPDY_deinit(void)
_MHD_EXTERN int SPDY_get_fdset(struct SPDY_Daemon *daemon, fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set)
_MHD_EXTERN struct SPDY_Response * SPDY_build_response(int status, const char *statustext, const char *version, struct SPDY_NameValue *headers, const void *data, size_t size)
_MHD_EXTERN int SPDY_send_ping(struct SPDY_Session *session, SPDY_PingCallback rttcb, void *rttcb_cls)
_MHD_EXTERN void SPDY_name_value_destroy(struct SPDY_NameValue *container)
Definition: structures.c:218
_MHD_EXTERN int SPDY_settings_lookup(const struct SPDY_Settings *container, enum SPDY_SETTINGS id, enum SPDY_FLAG_SETTINGS *flags, int32_t *value)
SPDY_RESPONSE_RESULT
Definition: microspdy.h:561
_MHD_EXTERN void SPDY_set_cls_to_session(struct SPDY_Session *session, void *cls)
SPDY_DAEMON_FLAG
Definition: microspdy.h:401
_MHD_EXTERN struct SPDY_Session * SPDY_get_session_for_request(const struct SPDY_Request *request)
_MHD_EXTERN void SPDY_set_panic_func(SPDY_PanicCallback cb, void *cls)
Definition: daemon.c:161
_MHD_EXTERN void * SPDY_get_cls_from_request(struct SPDY_Request *request)
ssize_t(* SPDY_ResponseCallback)(void *cls, void *buffer, size_t max, bool *more)
Definition: microspdy.h:724
void(* SPDY_PingCallback)(void *cls, struct SPDY_Session *session, struct timeval *rtt)
Definition: microspdy.h:768
SPDY_SETTINGS
Definition: microspdy.h:427
#define SPDY_init()
Definition: microspdy.h:826
_MHD_EXTERN void SPDY_set_cls_to_request(struct SPDY_Request *request, void *cls)
SPDY_IO_SUBSYSTEM
Definition: microspdy.h:318
_MHD_EXTERN int SPDY_name_value_iterate(struct SPDY_NameValue *container, SPDY_NameValueIterator iterator, void *iterator_cls)
Definition: structures.c:237
_MHD_EXTERN int SPDY_queue_response(struct SPDY_Request *request, struct SPDY_Response *response, bool closestream, bool consider_priority, SPDY_ResponseResultCallback rrcb, void *rrcb_cls)