1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/ops/optimizer_tests/unit_result2.rs
2022-11-27 04:48:17 +00:00

10 lines
297 B
Rust

pub fn op_set_nodelay(
state: &mut OpState,
rid: ResourceId,
nodelay: bool,
) -> Result<(), AnyError> {
super::check_unstable(state, "Deno.Conn#setNoDelay");
let resource: Rc<TcpStreamResource> =
state.resource_table.get::<TcpStreamResource>(rid)?;
resource.set_nodelay(nodelay)
}