diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-07-07 09:09:25 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-07 09:09:25 +0530 |
commit | 75d2c045f79aee4f772cb235860e6ef340177a05 (patch) | |
tree | af410764bb2f78ccb668c029c4b17c3901aaceea /ext/websocket/lib.rs | |
parent | 679a0c428c2aeebdd5c23141d3653b8fbb9c41fc (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.rs | 2 |
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(); |