diff options
Diffstat (limited to 'src/microspdy/structures.h')
-rw-r--r-- | src/microspdy/structures.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/src/microspdy/structures.h b/src/microspdy/structures.h index ff4c47ff..1c2a0aaf 100644 --- a/src/microspdy/structures.h +++ b/src/microspdy/structures.h | |||
@@ -317,6 +317,28 @@ struct SPDYF_Stream; | |||
317 | 317 | ||
318 | struct SPDYF_Response_Queue; | 318 | struct SPDYF_Response_Queue; |
319 | 319 | ||
320 | |||
321 | /** | ||
322 | * Callback for received new data chunk. | ||
323 | * | ||
324 | * @param cls client-defined closure | ||
325 | * @param stream handler | ||
326 | * @param buf data chunk from the data | ||
327 | * @param size the size of the data chunk 'buf' in bytes | ||
328 | * @param more false if this is the last frame received on this stream. Note: | ||
329 | * true does not mean that more data will come, exceptional | ||
330 | * situation is possible | ||
331 | * @return SPDY_YES to continue calling the function, | ||
332 | * SPDY_NO to stop calling the function for this stream | ||
333 | */ | ||
334 | typedef int | ||
335 | (*SPDYF_NewDataCallback) (void * cls, | ||
336 | struct SPDYF_Stream *stream, | ||
337 | const void * buf, | ||
338 | size_t size, | ||
339 | bool more); | ||
340 | |||
341 | |||
320 | /** | 342 | /** |
321 | * Callback for new stream. To be used in the application layer of the | 343 | * Callback for new stream. To be used in the application layer of the |
322 | * lib. | 344 | * lib. |
@@ -515,6 +537,11 @@ struct SPDYF_Stream | |||
515 | * Name value pairs, sent within the frame which created the stream. | 537 | * Name value pairs, sent within the frame which created the stream. |
516 | */ | 538 | */ |
517 | struct SPDY_NameValue *headers; | 539 | struct SPDY_NameValue *headers; |
540 | |||
541 | /** | ||
542 | * Any object to be used by the application layer. | ||
543 | */ | ||
544 | void *cls; | ||
518 | 545 | ||
519 | /** | 546 | /** |
520 | * This stream's ID. | 547 | * This stream's ID. |
@@ -888,9 +915,14 @@ struct SPDY_Daemon | |||
888 | 915 | ||
889 | /** | 916 | /** |
890 | * Callback called when HTTP POST params are received | 917 | * Callback called when HTTP POST params are received |
891 | * after request | 918 | * after request. To be used by the application layer |
919 | */ | ||
920 | SPDY_NewDataCallback received_data_cb; | ||
921 | |||
922 | /** | ||
923 | * Callback called when DATA frame is received. | ||
892 | */ | 924 | */ |
893 | SPDY_NewPOSTDataCallback new_post_data_cb; | 925 | SPDYF_NewDataCallback freceived_data_cb; |
894 | 926 | ||
895 | /** | 927 | /** |
896 | * Closure argument for all the callbacks that can be used by the client. | 928 | * Closure argument for all the callbacks that can be used by the client. |