/// <summary> /// </summary> /// <param name="ar">The ar.</param> protected virtual void EndSendData(IAsyncResult ar) { OutPacket outPacket = (OutPacket)ar.AsyncState; try { outPacket.DateTime = DateTime.Now; int sendCount = socket.EndSend(ar); if (outPacket.NeedAck()) { outPacket.TimeOut = Utils.Util.GetTimeMillis(DateTime.Now) + QQGlobal.QQ_TIMEOUT_SEND; policy.PushResend(outPacket, this.Name); } //outPacketQueue.Dequeue(); } catch (Exception e) { policy.OnNetworkError(e); } }