/// <summary> /// 发送数据(在多线程中主要实现了顺序的发送) /// </summary> /// <param name="packet">需要发送的数据包</param> public void Send(Packet packet) { if (Running == false) return; if (IsBatchNow) m_Socket.SendPackage(packet.WriterStream.GetBuffer(), false); else m_Socket.SendPackage(packet.WriterStream.GetBuffer()); packet.Release(); }
/// <summary> /// 发送数据(在多线程中主要实现了顺序的发送) /// </summary> /// <param name="packet">需要发送的数据包</param> public void Send(Packet packet) { if (Running == false) return; // 防止发送的顺序出错 m_Socket.SendPackage(packet.WriterStream.GetBuffer()); packet.Release(); }