public void Initialize(string manifestAssetBundleName) { if (m_init) { return; } LoadManifestDirectly(manifestAssetBundleName); m_utw = new UpdateTime <object, object>(); m_utw.init(GameConstant.Instance.TResourcesRecovery); m_utw.Evt_Act += UpdateClearUnusedResources; m_init = true; }
/// <summary> /// 即可做client也可做server /// </summary> public TService(int packetSizeLength, IPEndPoint ipEndPoint, Action <AChannel> acceptCallback) : base() { this.PacketSizeLength = packetSizeLength; m_UpdateTime = new UpdateTime(NetWorkConstant.Tcp_CheckIdleInternal); m_UpdateTime.Evt_Act += CheckTimeOut; this.AcceptCallback += acceptCallback; this.m_Acceptor = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); this.m_Acceptor.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true); this.m_InnArgs.Completed += this.OnComplete; this.m_Acceptor.Bind(ipEndPoint); this.m_Acceptor.Listen(NetWorkConstant.Tcp_ListenLen); this.AcceptAsync(); }
public TService(int packetSizeLength = Packet.PacketSizeLength2) { this.PacketSizeLength = packetSizeLength; m_UpdateTime = new UpdateTime(NetWorkConstant.Tcp_CheckIdleInternal); m_UpdateTime.Evt_Act += CheckTimeOut; }