Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for m in messages {
- for conn in match m.destination() {
- message::Destination::All => {
- connections.values()
- },
- message::Destination::Single(cid) => {
- connections.get(cid).iter()
- },
- message::Destination::Include(ref list) => {
- list.iter().filter_map(|cid| connections.get(cid))
- },
- message::Destination::Exclude(ref list) => {
- connections.iter().filter(|(cid, conn)| !list.contains(cid))
- },
- } {
- conn.outbound.send(m);
- }
- }
Add Comment
Please, Sign In to add comment