Ejemplo n.º 1
0
        /// <summary>
        /// Processes input sent to the sensor by Bro.
        /// </summary>
        /// <returns><c>true</c> if any input was processed; otherwise, <c>false</c>.</returns>
        /// <remarks>
        /// This function reads all input sent to the local sensor by the Bro peering at the current
        /// <see cref="BroConnection"/>. This function cannot block. <see cref="IsAlive"/> will
        /// report the actual state of the connection after a call to <see cref="ProcessInput"/>.
        /// </remarks>
        /// <exception cref="ObjectDisposedException">Cannot process input, <see cref="BroConnection"/> is disposed.</exception>
        public bool ProcessInput()
        {
            if (m_connectionPtr.IsInvalid())
            {
                throw new ObjectDisposedException("Cannot process input, Bro connection is disposed.");
            }

            return(BroApi.bro_conn_process_input(m_connectionPtr) != 0);
        }