zxl
/
CTT
forked from Cal/CTT
1
0
Fork 0
CTT/Server/Model/Module/Actor/ActorMessageSender.cs

28 lines
832 B
C#
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System.IO;
namespace ET
{
// 知道对方的instanceId使用这个类发actor消息
public readonly struct ActorMessageSender
{
public long ActorId { get; }
// 最近接收或者发送消息的时间
public long CreateTime { get; }
public MemoryStream MemoryStream { get; }
public bool NeedException { get; }
public ETTaskCompletionSource<IActorResponse> Tcs { get; }
public ActorMessageSender(long actorId, MemoryStream memoryStream, ETTaskCompletionSource<IActorResponse> tcs, bool needException)
{
this.ActorId = actorId;
this.MemoryStream = memoryStream;
this.CreateTime = TimeHelper.ServerNow();
this.Tcs = tcs;
this.NeedException = needException;
}
}
}