Esempio 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));
        }
Esempio n. 2
0
 public static async ETTask <IActorResponse> CallWithoutException(this ActorMessageSenderComponent self, long actorId, IActorRequest message)
 {
     return(await self.Call(actorId, message, false));
 }