public virtual void SendPacket(fmProtocol fp) { if (null == fp) { return; } using (Packet p = new Packet()) { fp.Serialize(p); Send(p.GetBuffer(), 0, p.GetPacketLen()); } }
public void SendPacket(fmProtocol fp) { if (null == m_session) { return; } if (null == fp) { return; } using (Packet sendPacket = new Packet()) { fp.Serialize(sendPacket); m_session.Send(sendPacket.GetBuffer(), 0, sendPacket.GetPacketLen()); } }