diff options
| -rw-r--r-- | include/qntan/Qntan.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h index 9cc79a3..9772de4 100644 --- a/include/qntan/Qntan.h +++ b/include/qntan/Qntan.h @@ -965,7 +965,7 @@ struct Qntan_XmlDec_Mentor { /* * WARN: HTTP IS EXPERMIMENTAL! DO NOT TRUST ANYTHING HERE! */ -struct Qntan_HttpClient_Req_Opts { +struct Qntan_HttpClient_Exchg_Opts { /* * Eg: 'GET', 'POST', ... */ char *mthd; @@ -1001,18 +1001,27 @@ struct Qntan_HttpClient_Req_Opts { /**/ }; -struct Qntan_HttpClient_Req { +struct Qntan_HttpClient_Exchg { /* + * Write another request body chunk. * @param flgs * 'flgs & 4' means this is the last buffer (aka EndOfMsg). */ void (*write)( struct Qntan_HttpClient**, req, void*buf, int len, int flgs, void(*onDone)(int,Qntan_Cls), Qntan_Cls ); + /* + * Set backpressure. This means that callbacks won't be called anymore. + * Events will be held back until resumed. */ + void (*pause)( struct Qntan_HttpClient**, ); + /* + * Reset backpressure. */ + void (*resume)( struct Qntan_HttpClient**, ); + /**/ }; struct Qntan_HttpClient { /**/ - void (*httpReq)( struct Qntan_HttpClient**, struct Qntan_HttpClient_Req_Opts*, - void(*onDone)(int,struct Qntan_HttpClient_Req**,Qntan_Cls), Qntan_Cls ); + void (*httpReq)( struct Qntan_HttpClient**, struct Qntan_HttpClient_Exchg_Opts*, + void(*onDone)(int,struct Qntan_HttpClient_Exchg**,Qntan_Cls), Qntan_Cls ); /**/ }; |
