Class: palava.Distributor

Defined in: coffee/


Distributor supports exchanging direct messages with peers through a channel. The incoming messages are filtered and outgoing messages are are sent within appropriate send_to_peer messages.

Instance Method Summary

Constructor Details

# (void) constructor(channel, peerId = null)


  • channel (palava.Channel) The channel to connect through
  • peerId (String) The id of the peer to connect to or null for global messages

Instance Method Details

# (void) on(event, handler) Bound

Adds a handler to the Distributor


distributor.on 'peer_left', (msg) => console.log "peer left!"


  • event (String) Event id on which the handler is called
  • handler (function) This function is called when the event is received

# (void) send(msg) Bound

Sends a message through the Distributor


  • msg (Object) The message to send through the distributor

    Quickly fuzzy find classes, mixins, methods, file:

    Control the navigation frame:

    You can focus and blur the search input: