March Docs

Session

Types

typeOpsOps = {#

Functions

fnattachattach(io : Cap(IO), ops : Ops) : Cap(Session.Live)#

Attach a transport. The only way to obtain a Cap(Session.Live).

fncloseclose(c : Cap(Session.Live), ep : Int) : ()#

Close endpoint ep.

fnemitemit(c : Cap(Session.Live), ep : Int, to : Int, msg : Bytes) : Int#

Send msg from ep to role to; returns the continuation endpoint.

fnregisterregister(c : Cap(Session.Live), ap : Int, role : Int) : Int#

Join a session at access point ap in role role; returns the endpoint.

fnsuspendsuspend(c : Cap(Session.Live), ep : Int, handler : Int -> Bytes -> Int -> Int) : Int#

Install handler for the next delivery on ep and yield.