OxL Reference

method net.block

Asymmetric partition: messages from from to to are lost, the opposite direction still works.

Example:

oxl✓ checked in CI
use std.test { net }

test sim "one way block" seeds 1..=2 {
  net.block(["a"], ["b"])
  assert net.isBlocked("a", "b")
  assert !net.isBlocked("b", "a")
}
pub(api) static fn block(from: List<str>, to: List<str>, r#for: Dur = 0ms)

Since. 1.0.0-beta

Parameters

NameType
fromList<str>
toList<str>
r#for: Dur = 0ms

Effects

none declared (pure unless the body says otherwise)

Defined in: std/test/test.oxl:166

See also