Property definitions

libevent $ NativeEventBase :: defaultinit
# Structure to hold information and state for a Libevent dispatch loop.
#
# The event_base lies at the center of Libevent; every application will
# have one.  It keeps track of all pending and active events, and
# notifies your application of the active ones.
extern class NativeEventBase `{ struct event_base * `}

	# Create a new event_base to use with the rest of Libevent
	new `{ return event_base_new(); `}

	# Has `self` been correctly initialized?
	fun is_valid: Bool do return not address_is_null

	# Reinitialize the event base after a fork
	#
	# Some event mechanisms do not survive across fork.
	# The event base needs to be reinitialized with the `reinit` method.
	#
	# Returns `true` if some events could not be re-added.
	fun reinit: Bool `{ return event_reinit(self); `}

	# Event dispatching loop
	#
	# This loop will run the event base until either there are no more added
	# events, or until something calls `loopexit`.
	fun dispatch `{ event_base_dispatch(self); `}

	# Exit the event loop
	#
	# TODO support timer
	fun loopexit `{ event_base_loopexit(self, NULL); `}

	redef fun free `{ event_base_free(self); `}
end
lib/libevent/libevent.nit:83,1--116,3