Black Lives Matter. Support the Equal Justice Initiative.

Source file src/runtime/netpoll_fake.go

Documentation: runtime

     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  }
    37  

View as plain text