monky-2.1.0.0: A system state collecting library and application

PortabilityLinux
Stabilitytesting
Maintainerongy
Safe HaskellNone

Monky.Network.Dynamic

Description

This module exports a handle to access dynamic network configurations.

This will update when a new network interface appears or disappears. The value returned by this will be the sum over all interfaces.

Synopsis

Documentation

getUHandlesSource

Arguments

:: (String -> Bool)

Will be given the name of the handle, only add interface if this returns true (think of it as filter over all possible interfaces)

-> IO UHandles 

Get the new handle this module exports and start its updater loop

type UHandles = (IORef Handles, String -> Bool)Source

The actual handel exposed and used by this module

type Handles = IntMap NetHandleSource

The map we keep our handles in (the Int is the Interface ID on the system)

getMultiReadWrite :: Handles -> IO (Maybe (Int, Int))Source

Get the sum of all read/write rates from our network devices or Nothing if none is active