public Rpc <TState, TContext, TUserContext> Call <TState, TContext, TUserContext, TData>(TState state, TContext context, TUserContext userContext, ActorRef destination, TData data) where TState : class where TContext : class where TUserContext : class where TData : class { var(ctx, rpc) = PrepareCall(state, context, userContext); m_Net.Send(destination, new RpcMessage <TData>(ctx.Id, data)); return(Unsafe.As <Rpc <TState, TContext, TUserContext> >(rpc)); }
void OnEventMessage(NetContext <EventMessage <object> > ctx) { if (!m_Receivers.TryGetValue(ctx.Data.Data.GetType(), out var receivers)) { return; } // Todo: need a forward function from NetComponent to be able to pool correctly this forwarded message m_Net.Send(receivers, ctx.Data); }
public void Send(TData data) { m_Net.Send(m_Output.Receivers, data); }