Monitor.tmonitor listens for changes to the device list. A monitor is created by connecting to the kernel daemon through netlink (see
Monitor.set_filter, specifying a list of
val create :
?source:netlink_source -> Udev.Context.t -> t
Udev: the monitor listens to the events emitted
after udev has registered and configured the device. This is the absolutely
recommended source for applications.
Kernel means that the monitor receives the events directly
after the kernel has seen the device. The device has not yet been configured
by udev and might not be usable at all. Do not use this, unless you know
what you are doing.
val set_filter :
t -> filter list -> unit
val start :
t -> unit
mwill not receive events until
Monitor.start mis called. This function does nothing if called on an already started monitor.
val receive_device :
?timeout:float -> t -> Udev.Device.t
Monitor.receive_device ~timeout mwill block until a device event is received, or after
timeoutseconds, in which case the
Timeoutexception is raised.
timeout value is specified, the function blocks until a device
event is available. A
0. means that the function just polls
and will never block.
val context :
t -> Udev.Context.t
val set_receive_buffer_size :
t -> int -> unit
val fd :
t -> Unix.file_descr