Ejemplo n.º 1
0
        /// <summary>
        /// Send a Command (Packet) asyncron
        /// </summary>
        /// <param name="packet"></param>
        public void Send(PacketOut packet)
        {
            byte[] buffer = packet.Compile();
            int    length = buffer.Length;

            Utilities.ServerDump(buffer, length);

            Socket.BeginSend(
                buffer, 0,
                length, 0,
                new AsyncCallback(CallbackSend),
                Socket
                );
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Send a Command (Packet) asyncron
        /// </summary>
        /// <param name="packet"></param>
        public void Send(PacketOut packet)
        {
            byte[] buffer = packet.Compile();
            int length = buffer.Length;

            Utilities.ServerDump(buffer, length);

            Socket.BeginSend(
                buffer, 0,
                length, 0,
                new AsyncCallback(CallbackSend),
                Socket
            );
        }