public void PostReceiveEnd(ReceivePacket entity, bool isSuccess) { ReceiveListener listener = mReceiveListener; if (listener != null && entity != null) { entity.SetSuccess(isSuccess); PostQueue(() => { listener.OnReceiveEnd(entity); }); } }
public void Run() { if (listener != null) { if (progress > 0) { listener.OnReceiveProgress(entity, progress); } else if (isEnd) { listener.OnReceiveEnd(entity); } else { listener.OnReceiveStart(entity.GetPacketType(), entity.GetId()); } } entity = null; listener = null; }
public void Run() { listener.OnReceiveEnd(entity); entity = null; listener = null; }