Ocamlnet 3 Reference Manual : Netplex_mbox.Make_mbox_type

# Functor Netplex_mbox.Make_mbox_type

    module Make_mbox_type: functor (T : Netplex_cenv.TYPE) -> MBOX  with type t = T.t

Create a new mailbox access module for message type `T.t`

Parameters: |
`T` | : | `Netplex_cenv.TYPE`

    type t

The type of messages

    type mbox

The type of the mailboxes

    val create : string -> mbox

Creates a new mailbox with the passed name, or opens an existing mailbox. Names are global to the whole Netplex process system.

    val send : mbox -> t -> unit

Send a message to this box. If the box is full, it is waited until the box is free again. If several senders wait for the box, one sender is selected.

    val receive : mbox -> t

Receive a message: It is waited until a sender puts a message into the box. If several receivers wait for the box, one receiver is selected.