You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
800 B
28 lines
800 B
3 years ago
|
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 ETTask<IActorResponse> Tcs { get; }
|
||
|
|
||
|
public ActorMessageSender(long actorId, MemoryStream memoryStream, ETTask<IActorResponse> tcs, bool needException)
|
||
|
{
|
||
|
this.ActorId = actorId;
|
||
|
this.MemoryStream = memoryStream;
|
||
|
this.CreateTime = TimeHelper.ServerNow();
|
||
|
this.Tcs = tcs;
|
||
|
this.NeedException = needException;
|
||
|
}
|
||
|
}
|
||
|
}
|