summaryrefslogtreecommitdiffhomepage
path: root/src/rust/unit-wasm-sys
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2023-08-29 23:30:21 +0100
committerAndrew Clayton <a.clayton@nginx.com>2023-08-29 23:30:21 +0100
commit5dc0cf051059ac83899b55f4a55df363faea4419 (patch)
tree0d93c67fc733d55f9f9eebe176bfad3bf1984738 /src/rust/unit-wasm-sys
parentf748851daf87ce40cd2fed8c205afc4482c689a1 (diff)
downloadunit-wasm-5dc0cf051059ac83899b55f4a55df363faea4419.tar.gz
unit-wasm-5dc0cf051059ac83899b55f4a55df363faea4419.tar.bz2
Rust/rusty: Add a wrapper for luw_get_http_total_content_sent()
This returns the total amount of content that the Wasm module has received so far. Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/rust/unit-wasm-sys')
-rw-r--r--src/rust/unit-wasm-sys/rusty.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/rust/unit-wasm-sys/rusty.rs b/src/rust/unit-wasm-sys/rusty.rs
index be7a5e1..81b3e5b 100644
--- a/src/rust/unit-wasm-sys/rusty.rs
+++ b/src/rust/unit-wasm-sys/rusty.rs
@@ -103,6 +103,10 @@ pub fn uwr_get_http_content_sent(ctx: *const luw_ctx_t) -> usize {
unsafe { luw_get_http_content_sent(ctx) }
}
+pub fn uwr_get_http_total_content_sent(ctx: *const luw_ctx_t) -> usize {
+ unsafe { luw_get_http_total_content_sent(ctx) }
+}
+
pub fn uwr_get_http_content(ctx: *const luw_ctx_t) -> *const u8 {
unsafe { luw_get_http_content(ctx) }
}