1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/ops/optimizer_tests/unit_result2.rs
Bartek Iwańczuk f9db129bdf
feat: Stabilize Deno.TcpConn.setNoDelay() and Deno.TcpConn.setKeepAlive() (#17003)
This commit stabilizes following APIs:
- `Deno.TcpConn.setNoDelay()`
- `Deno.TcpConn.setKeepAlive()`
2022-12-14 00:54:11 +01:00

9 lines
241 B
Rust

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