Example #1
0
        /// <summary>
        /// Sends a packet via TCP
        /// </summary>
        /// <param name="packet">The packet to be sent</param>
        public void SendTCP(PacketOut packet)
        {
            //Fix the packet size
            packet.FinalizeLengthAndChecksum();

            //SavePacket(packet);

            //Get the packet buffer
            byte[] buf = packet.GetBuffer(); //packet.WritePacketLength sets the Capacity

            //Send the buffer
            SendTCP(buf);
        }
Example #2
0
 /// <summary>
 /// Send the packet via TCP without changing any portion of the packet
 /// </summary>
 /// <param name="packet">Packet to send</param>
 public void SendTCPRaw(PacketOut packet)
 {
     SendTCP((byte[])packet.GetBuffer().Clone());
 }
Example #3
0
 /// <summary>
 /// Send the packet via TCP without changing any portion of the packet
 /// </summary>
 /// <param name="packet">Packet to send</param>
 public void SendTCPRaw(PacketOut packet)
 {
     SendTCP((byte[])packet.GetBuffer().Clone());
 }
Example #4
0
        /// <summary>
        /// Sends a packet via TCP
        /// </summary>
        /// <param name="packet">The packet to be sent</param>
        public void SendTCP(PacketOut packet)
        {
            //Fix the packet size
            packet.FinalizeLengthAndChecksum();

            //SavePacket(packet);

            //Get the packet buffer
            byte[] buf = packet.GetBuffer(); //packet.WritePacketLength sets the Capacity

            //Send the buffer
            SendTCP(buf);
        }