select-0.4: Wrap the select(2) POSIX function

Safe HaskellNone



Various types.



data Timeout Source

A timeout of Never tells select(2) to never time out, while Time sets a finite timeout.


Time CTimeval 

data CTimeval Source

A Storable instance for struct timeval (see select(2)). The first argument corresponds to tv_sec, the second to tv_usec.


CTimeval CLong CLong 


finite :: CLong -> CLong -> TimeoutSource

finite s us tells select to time out after s seconds and us microseconds.

data Result Source

Abstraction for the return value of select. Error means that select returned an error, while Timeout means it timed out. Ready n rfds wfds efds specifies that it returned because the file descriptors in rfds, wfds and efds are ready in their respective ways (see select(2)), with n descriptors in total.

numReady :: Result -> CIntSource

The total number of ready file descriptors across all three sets.

readyRead :: Result -> FdSetSource

The file descriptors ready for reading.

readyWrite :: Result -> FdSetSource

The file descriptors ready for writing.

readyException :: Result -> FdSetSource

The file descriptors having exceptional conditions.