public virtual void broadcast_rpc_Handle(ConnectorBroadcastNotify notify) { var sockets = sessionMap.GetNotifySockets(notify.serverGroups, notify.sessions); var binary = ClientCodec.ToBinary(notify.notify); foreach (var socket in sockets) { socket.Send(binary); } }
public override void OnWormholeTransported(RemoteAddress from, object message) { if (message is ConnectorBroadcastNotify notify) { var sockets = sessionMap.GetNotifySockets(notify.serverGroups, notify.sessions); var binary = ClientCodec.ToBinary(notify.notify); foreach (var socket in sockets) { socket.Send(binary); } } else if (message is ISerializable toall) { acceptor.Broadcast(toall); } }