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