// Sends a direct message to a known node. func (o *Overlay) Direct(dest *big.Int, msg *proto.Message) error { if err := msg.Encrypt(); err != nil { return err } o.sendDirect(dest, msg) return nil }
// Balances a message to one of the subscribed nodes. func (o *Overlay) Balance(topic string, msg *proto.Message) error { if err := msg.Encrypt(); err != nil { return err } o.sendBalance(pastry.Resolve(topic), msg) return nil }