예제 #1
0
        /// <summary>
        /// Sends a packet to a server
        /// </summary>
        /// <param name="packet"></param>
        public static void Send(PacketStream packet)
        {
            // Completes the packet and retrieve it
            byte[] data = packet.Finalize();

            _server.Socket.BeginSend(
                data,
                0,
                data.Length,
                SocketFlags.None,
                new AsyncCallback(sendCallback),
                null
                );
        }