Esempio n. 1
0
        /// <summary>
        /// Sends a packet to a server
        /// </summary>
        /// <param name="packet"></param>
        public void Send(PacketStream packet)
        {
            // Completes the packet and retrieve it
            byte[] data = packet.GetPacket().ToArray();

            // Dump and send
            _Server.ClSocket.BeginSend(
                _Server.OutCipher.DoCipher(ref data),
                0,
                data.Length,
                SocketFlags.None,
                new AsyncCallback(SendCallback),
                null
                );
        }