Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | toralf.wittner@gmail.com |
Low level interface to Linux' epoll, a high performance polling mechanism which handles high numbers of file descriptors efficiently. See man epoll(7) for details.
- data EventType
- data Size
- toSize :: Int -> Maybe Size
- data Duration
- toDuration :: Int -> Maybe Duration
- data Descriptor a
- data Device
- data Event a
- (=~) :: EventType -> EventType -> Bool
- create :: Size -> IO Device
- close :: Device -> IO ()
- wait :: Duration -> Device -> IO [Event a]
- add :: Device -> a -> [EventType] -> Fd -> IO (Descriptor a)
- modify :: Device -> [EventType] -> Descriptor a -> IO ()
- delete :: Device -> Descriptor a -> IO ()
- inEvent :: EventType
- outEvent :: EventType
- peerCloseEvent :: EventType
- urgentEvent :: EventType
- errorEvent :: EventType
- hangupEvent :: EventType
- edgeTriggeredEvent :: EventType
- oneShotEvent :: EventType
Documentation
EventType corresponds to epoll's event type defines, e.g. EPOLLIN, EPOLLOUT, EPOLLET, etc.
Unsigned type used for timeout specifications.
toDuration :: Int -> Maybe DurationSource
data Descriptor a Source
wait :: Duration -> Device -> IO [Event a]Source
Waits for the specified duration on all event descriptors. Returns the list of events that occured.
modify :: Device -> [EventType] -> Descriptor a -> IO ()Source
Modified the event types of the event descriptor.