Пример #1
0
        public virtual void SendPacket(fmProtocol fp)
        {
            if (null == fp)
            {
                return;
            }

            using (Packet p = new Packet())
            {
                fp.Serialize(p);
                Send(p.GetBuffer(), 0, p.GetPacketLen());
            }
        }
Пример #2
0
        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());
            }
        }