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

Safe HaskellNone

System.Posix.IO.Select.Types

Description

Various types.

Synopsis

Documentation

data Timeout Source

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

Constructors

Never 
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.

Constructors

CTimeval CLong CLong 

Instances

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.