diff options
Diffstat (limited to 'src/include/microspdy.h')
-rw-r--r-- | src/include/microspdy.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/src/include/microspdy.h b/src/include/microspdy.h index 272c411a..3b36025f 100644 --- a/src/include/microspdy.h +++ b/src/include/microspdy.h | |||
@@ -628,7 +628,9 @@ typedef int | |||
628 | 628 | ||
629 | 629 | ||
630 | /** | 630 | /** |
631 | * Callback for received SPDY request. | 631 | * Callback for received SPDY request. The functions is called whenever |
632 | * a reqest comes, but will also be called if more headers/trailers are | ||
633 | * received. | ||
632 | * | 634 | * |
633 | * @param cls client-defined closure | 635 | * @param cls client-defined closure |
634 | * @param request handler. The request object is required for | 636 | * @param request handler. The request object is required for |
@@ -642,6 +644,11 @@ typedef int | |||
642 | * @param host called host as in HTTP | 644 | * @param host called host as in HTTP |
643 | * @param scheme used ("http" or "https"). In SPDY 3 it is only "https". | 645 | * @param scheme used ("http" or "https"). In SPDY 3 it is only "https". |
644 | * @param headers other HTTP headers from the request | 646 | * @param headers other HTTP headers from the request |
647 | * @param more a flag saying if more data related to the request is | ||
648 | * expected to be received. HTTP body may arrive (e.g. POST data); | ||
649 | * then SPDY_NewDataCallback will be called for the connection. | ||
650 | * It is also possible that more headers/trailers may arrive; | ||
651 | * then the same callback will be invoked. | ||
645 | */ | 652 | */ |
646 | typedef void (*SPDY_NewRequestCallback) (void * cls, | 653 | typedef void (*SPDY_NewRequestCallback) (void * cls, |
647 | struct SPDY_Request * request, | 654 | struct SPDY_Request * request, |
@@ -651,24 +658,27 @@ typedef void (*SPDY_NewRequestCallback) (void * cls, | |||
651 | const char * version, | 658 | const char * version, |
652 | const char * host, | 659 | const char * host, |
653 | const char * scheme, | 660 | const char * scheme, |
654 | struct SPDY_NameValue * headers); | 661 | struct SPDY_NameValue * headers, |
662 | bool more); | ||
655 | 663 | ||
656 | 664 | ||
657 | /** | 665 | /** |
658 | * Callback for received new data chunk from the POST data of a given | 666 | * Callback for received new data chunk (HTTP body) from a given |
659 | * request. | 667 | * request (e.g. POST data). |
660 | * | 668 | * |
661 | * @param cls client-defined closure | 669 | * @param cls client-defined closure |
662 | * @param request handler | 670 | * @param request handler |
663 | * @param buf data chunk from the POST data | 671 | * @param buf data chunk from the POST data |
664 | * @param size the size of the data chunk 'buf' in bytes | 672 | * @param size the size of the data chunk 'buf' in bytes. Note that it |
665 | * @param more false if this is the last chunk from the POST data. Note: | 673 | * may be 0. |
674 | * @param more false if this is the last chunk from the data. Note: | ||
666 | * true does not mean that more data will come, exceptional | 675 | * true does not mean that more data will come, exceptional |
667 | * situation is possible | 676 | * situation is possible |
668 | * @return SPDY_YES to continue calling the function, | 677 | * @return SPDY_YES to continue calling the function, |
669 | * SPDY_NO to stop calling the function for this request | 678 | * SPDY_NO to stop calling the function for this request |
670 | */ | 679 | */ |
671 | typedef int (*SPDY_NewPOSTDataCallback) (void * cls, | 680 | typedef int |
681 | (*SPDY_NewDataCallback) (void * cls, | ||
672 | struct SPDY_Request *request, | 682 | struct SPDY_Request *request, |
673 | const void * buf, | 683 | const void * buf, |
674 | size_t size, | 684 | size_t size, |
@@ -855,7 +865,7 @@ SPDY_start_daemon (uint16_t port, | |||
855 | SPDY_NewSessionCallback nscb, | 865 | SPDY_NewSessionCallback nscb, |
856 | SPDY_SessionClosedCallback sccb, | 866 | SPDY_SessionClosedCallback sccb, |
857 | SPDY_NewRequestCallback nrcb, | 867 | SPDY_NewRequestCallback nrcb, |
858 | SPDY_NewPOSTDataCallback npdcb, | 868 | SPDY_NewDataCallback npdcb, |
859 | void * cls, | 869 | void * cls, |
860 | ...); | 870 | ...); |
861 | 871 | ||