Documentation
¶
Index ¶
- func AddRead(p, fd int, readon, writeon *bool) error
- func AddWrite(p, fd int, readon, writeon *bool) error
- func DelRead(p, fd int, readon, writeon *bool) error
- func DelWrite(p, fd int, readon, writeon *bool) error
- func GetFD(evs interface{}, i int) int
- func MakeEvents(n int) interface{}
- func MakePoll() (p int, err error)
- func SetKeepAlive(fd, secs int) error
- func Wait(p int, evs interface{}, timeout time.Duration) (n int, err error)
- type TimeoutQueue
- type TimeoutQueueItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeEvents ¶
func MakeEvents(n int) interface{}
func SetKeepAlive ¶
Types ¶
type TimeoutQueue ¶
type TimeoutQueue struct {
// contains filtered or unexported fields
}
TimeoutQueue is a priority queue ordere be ascending time.Time.
func NewTimeoutQueue ¶
func NewTimeoutQueue() *TimeoutQueue
NewTimeoutQueue returns a new TimeoutQueue.
func (*TimeoutQueue) Len ¶
func (q *TimeoutQueue) Len() int
Len returns the number of items in the queue
func (*TimeoutQueue) Peek ¶
func (q *TimeoutQueue) Peek() TimeoutQueueItem
Peek returns the items with the smallest value, but does not remove it.
func (*TimeoutQueue) Pop ¶
func (q *TimeoutQueue) Pop() TimeoutQueueItem
Pop removes and returns the items with the smallest value.
type TimeoutQueueItem ¶
TimeoutQueueItem is an item for TimeoutQueue
Click to show internal directories.
Click to hide internal directories.