+% Cast all messages to one destination
+cast_all2one(_, []) -> ok;
+cast_all2one(Server, [Msg | Msgs]) ->
+ ok = gen_server:cast(Server, Msg),
+ cast_all2one(Server, Msgs).
+
+
+% Cast one message to all destinations
+cast_one2all([], _) -> ok;
+cast_one2all([Server | Servers], Msg) ->