Portability | Linux |
---|---|
Stability | testing |
Maintainer | ongy |
Safe Haskell | None |
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.
- getUHandles :: (String -> Bool) -> IO UHandles
- type UHandles = (IORef Handles, String -> Bool)
- type Handles = IntMap NetHandle
- getMultiReadWrite :: Handles -> IO (Maybe (Int, Int))
Documentation
:: (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