mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
f9db129bdf
This commit stabilizes following APIs: - `Deno.TcpConn.setNoDelay()` - `Deno.TcpConn.setKeepAlive()`
9 lines
241 B
Rust
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)
|
|
}
|