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 Client(ClientCodec codec = default, sync.Mutex reqMutex = default, Request request = default, sync.Mutex mutex = default, ulong seq = default, map <ulong, ptr <Call> > pending = default, bool closing = default, bool shutdown = default) { this.codec = codec; this.reqMutex = reqMutex; this.request = request; this.mutex = mutex; this.seq = seq; this.pending = pending; this.closing = closing; this.shutdown = shutdown; }
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); } }