The Links Programming Language
type t
val empty : ProcessTypes.client_id -> websocket_url option -> t

Creates a JSON state, given a set of process IDs to spawn, and a set of * event handlers to activate

val add_process : ProcessTypes.process_id -> Value.t -> Value.t list -> t -> t

Adds a process and its mailbox to the state

val add_event_handler : handler_id -> Value.t -> t -> t

Adds an event handler to the state

val add_ap_id : ProcessTypes.apid -> t -> t

Adds an access point ID to the state

val add_carried_channel : Value.chan -> t -> t
val get_carried_channels : t -> Value.chan list
val add_buffer : ProcessTypes.channel_id -> Value.t list -> t -> t

Adds a buffer to the state

val to_json : t -> Yojson.Basic.t

Serialises the state as a JSON string