Exemplo n.º 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());
            }
        }
Exemplo n.º 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());
            }
        }