Multicast Asynchronous Channels
make-multicast-channel
multicast-channel?
make-multicast-receiver
multicast-channel-put
6.3.90.900

Multicast Asynchronous Channels

 (require alexis/multicast) package: alexis-multicast

This provides an implementation of multicast channels, an extension of asynchronous channels that may have multiple recievers. Unlike asynchronous channels, multicast channels have distinct “server” and “receiver” objects, since multicast channels create a one-to-many relationship.

Creates and returns a new multicast channel server.

procedure

(multicast-channel? v)  boolean?

  v : any/c
Returns #t if v is a multicast channel, #f otherwise.

Creates a receiver asynchronous channel that receives messages from mc. The returned value is a standard asynchronous channel from racket/async-channel, but it does not support async-channel-put. Attempting to write to a receiver channel will raise an exception.

procedure

(multicast-channel-put mc v)  void?

  mc : multicast-channel?
  v : any/c
Broadcasts v to all receivers listening to mc.