summaryrefslogtreecommitdiff
path: root/ext/websocket/lib.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-07-07 09:09:25 +0530
committerGitHub <noreply@github.com>2023-07-07 09:09:25 +0530
commit75d2c045f79aee4f772cb235860e6ef340177a05 (patch)
treeaf410764bb2f78ccb668c029c4b17c3901aaceea /ext/websocket/lib.rs
parent679a0c428c2aeebdd5c23141d3653b8fbb9c41fc (diff)
perf(ext/websocket): optimize server websocket js (#19719)
Split from https://github.com/denoland/deno/pull/19686 - timestamp set to 0 for server websocket events. - take fast call path with op_ws_send_binary.
Diffstat (limited to 'ext/websocket/lib.rs')
-rw-r--r--ext/websocket/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/websocket/lib.rs b/ext/websocket/lib.rs
index a8d18b4ad..5ac1f0197 100644
--- a/ext/websocket/lib.rs
+++ b/ext/websocket/lib.rs
@@ -407,7 +407,7 @@ pub fn ws_create_server_stream(
}
#[op(fast)]
-pub fn op_ws_send_binary(state: &mut OpState, rid: ResourceId, data: JsBuffer) {
+pub fn op_ws_send_binary(state: &mut OpState, rid: ResourceId, data: &[u8]) {
let resource = state.resource_table.get::<ServerWebSocket>(rid).unwrap();
let data = data.to_vec();
let len = data.len();