Example #1
0
 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));
 }
Example #2
0
        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);
        }
Example #3
0
 public void Send(TData data)
 {
     m_Net.Send(m_Output.Receivers, data);
 }