github.com/comwrg/go/src@v0.0.0-20220319063731-c238d0440370/runtime/netpoll_fake.go (about) 1 // 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 5 // Fake network poller for wasm/js. 6 // Should never be used, because wasm/js network connections do not honor "SetNonblock". 7 8 //go:build js && wasm 9 // +build js,wasm 10 11 package runtime 12 13 func netpollinit() { 14 } 15 16 func netpollIsPollDescriptor(fd uintptr) bool { 17 return false 18 } 19 20 func netpollopen(fd uintptr, pd *pollDesc) int32 { 21 return 0 22 } 23 24 func netpollclose(fd uintptr) int32 { 25 return 0 26 } 27 28 func netpollarm(pd *pollDesc, mode int) { 29 } 30 31 func netpollBreak() { 32 } 33 34 func netpoll(delay int64) gList { 35 return gList{} 36 }