aboutsummaryrefslogtreecommitdiff
path: root/src/javascript/jsc/api/server.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-03 04:44:11 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-03 04:44:11 -0700
commite5322eb63bf6ff8deb0f2aade42b9caae40a47cc (patch)
tree87b72fe1895f92068e908aaaddafe5ef514d8daf /src/javascript/jsc/api/server.zig
parent102553dca6a090533725416cc384d36a49a9ce1d (diff)
downloadbun-e5322eb63bf6ff8deb0f2aade42b9caae40a47cc.tar.gz
bun-e5322eb63bf6ff8deb0f2aade42b9caae40a47cc.tar.zst
bun-e5322eb63bf6ff8deb0f2aade42b9caae40a47cc.zip
Move streams to it's own file
Diffstat (limited to 'src/javascript/jsc/api/server.zig')
-rw-r--r--src/javascript/jsc/api/server.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/javascript/jsc/api/server.zig b/src/javascript/jsc/api/server.zig
index aa4cb91a0..bec079e90 100644
--- a/src/javascript/jsc/api/server.zig
+++ b/src/javascript/jsc/api/server.zig
@@ -1359,7 +1359,7 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
}
}
- pub fn onRequestData(this: *RequestContext) void {
+ pub fn onPull(this: *RequestContext) void {
if (this.req.header("content-length")) |content_length| {
const len = std.fmt.parseInt(usize, content_length, 10) catch 0;
if (len == 0) {
@@ -1396,8 +1396,8 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
this.resp.onData(*RequestContext, onBodyChunk, this);
}
- pub fn onRequestDataCallback(this: *anyopaque) void {
- onRequestData(bun.cast(*RequestContext, this));
+ pub fn onPullCallback(this: *anyopaque) void {
+ onPull(bun.cast(*RequestContext, this));
}
};
}
@@ -1700,7 +1700,7 @@ pub fn NewServer(comptime ssl_enabled_: bool, comptime debug_mode_: bool) type {
.Locked = .{
.task = ctx,
.global = this.globalThis,
- .onRequestData = RequestContext.onRequestDataCallback,
+ .onPull = RequestContext.onPullCallback,
},
},
};