blob: aab18dc8468cd5e4345f3e5be5d3e5a781617672 [file] [log] [blame]
Colin Cross7bb052a2015-02-03 12:59:37 -08001// Copyright 2013 The Go Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
Dan Willemsenf3f2eb62018-08-28 11:28:58 -07005// Fake network poller for NaCl and wasm/js.
6// Should never be used, because NaCl and wasm/js network connections do not honor "SetNonblock".
7
8// +build nacl js,wasm
Colin Cross7bb052a2015-02-03 12:59:37 -08009
10package runtime
11
12func netpollinit() {
13}
14
Dan Willemsenc78f7142017-07-26 13:08:14 -070015func netpolldescriptor() uintptr {
16 return ^uintptr(0)
17}
18
Colin Cross7bb052a2015-02-03 12:59:37 -080019func netpollopen(fd uintptr, pd *pollDesc) int32 {
20 return 0
21}
22
23func netpollclose(fd uintptr) int32 {
24 return 0
25}
26
27func netpollarm(pd *pollDesc, mode int) {
28}
29
30func netpoll(block bool) *g {
31 return nil
32}