Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FDResultSets ¶
type FDResultSets struct {
// contains filtered or unexported fields
}
FDResultSets contains the result of a Select operation.
func Select ¶
func Select(rd, wr, er *FDSet, timeout time.Duration) (*FDResultSets, error)
Select performs a select system call, file descriptors in the rd set are tested for read-events, file descriptors in the wd set are tested for write-events and file descriptors in the er set are tested for error-events. The function will block until an event happens or the timeout expires. The function return an FDResultSets that contains all the file descriptor that have a pending read/write/error event.
func (*FDResultSets) IsError ¶
func (r *FDResultSets) IsError(fd int) bool
IsError test if a file descriptor is in error state.
func (*FDResultSets) IsReadable ¶
func (r *FDResultSets) IsReadable(fd int) bool
IsReadable test if a file descriptor is ready to be read.
func (*FDResultSets) IsWritable ¶
func (r *FDResultSets) IsWritable(fd int) bool
IsWritable test if a file descriptor is ready to be written.
type FDSet ¶
type FDSet struct {
// contains filtered or unexported fields
}
FDSet is a set of file descriptors suitable for a select call
type Pipe ¶
type Pipe struct {
// contains filtered or unexported fields
}
Pipe represents a unix-pipe