-
Notifications
You must be signed in to change notification settings - Fork 14
/
poll_other.go
55 lines (43 loc) · 1.23 KB
/
poll_other.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright (c) 2020 Meng Huang ([email protected])
// This package is licensed under a MIT license that can be found in the LICENSE file.
//go:build !linux && !darwin && !dragonfly && !freebsd && !netbsd && !openbsd
// +build !linux,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd
package netpoll
import (
"errors"
"time"
)
// Tag is the poll type.
var Tag = "none"
// Poll represents the poll that supports non-blocking I/O on file descriptors with polling.
type Poll struct {
}
// Create creates a new poll.
func Create() (*Poll, error) {
return nil, errors.New("system not supported")
}
// SetTimeout sets the wait timeout.
func (p *Poll) SetTimeout(d time.Duration) (err error) {
return nil
}
// Register registers a file descriptor.
func (p *Poll) Register(fd int) (err error) {
return
}
// Write adds a write event.
func (p *Poll) Write(fd int) (err error) {
return
}
// Unregister unregisters a file descriptor.
func (p *Poll) Unregister(fd int) (err error) {
return
}
// Wait waits events.
func (p *Poll) Wait(events []Event) (n int, err error) {
return
}
// Close closes the poll fd. The underlying file descriptor is closed by the
// destroy method when there are no remaining references.
func (p *Poll) Close() error {
return nil
}