Ejemplo n.º 1
0
        public static async ETTask <IActorResponse> Call(
            this ActorMessageSenderComponent self,
            long actorId,
            IActorRequest request,
            bool needException = true
            )
        {
            request.RpcId = self.GetRpcId();

            if (actorId == 0)
            {
                throw new Exception($"actor id is 0: {request}");
            }

            (ushort _, MemoryStream stream) = MessageSerializeHelper.MessageToStream(request);

            return(await self.Call(actorId, request.RpcId, stream, needException));
        }
Ejemplo n.º 2
0
 public static async ETTask <IActorResponse> CallWithoutException(this ActorMessageSenderComponent self, long actorId, IActorRequest message)
 {
     return(await self.Call(actorId, message, false));
 }