Module Message.Port

Message ports.

type t

The type for MessagePort objects.

val as_target : t -> Brr.Ev.target

as_target p is p as an event target.

val start : t -> unit

start p starts p.

val close : t -> unit

close p closes p.

val post : ?⁠opts:opts -> t -> 'a -> unit

post ~opts p v posts value v on port p with options opts (the target_origin option is meaningless in this case).