Files
wazero/internal/sysfs/sock_unsupported.go
Crypt Keeper f3778cae08 wasi: fix nonblocking sockets on *NIX (gotip net/http) (#1503)
Signed-off-by: Adrian Cole <adrian@tetrate.io>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2023-06-13 06:51:32 +10:00

27 lines
526 B
Go

//go:build !linux && !darwin && !windows
package sysfs
import (
"net"
"syscall"
socketapi "github.com/tetratelabs/wazero/internal/sock"
)
// MSG_PEEK is a filler value.
const MSG_PEEK = 0x2
func newTCPListenerFile(tl *net.TCPListener) socketapi.TCPSock {
return &unsupportedSockFile{}
}
type unsupportedSockFile struct {
baseSockFile
}
// Accept implements the same method as documented on socketapi.TCPSock
func (f *unsupportedSockFile) Accept() (socketapi.TCPConn, syscall.Errno) {
return nil, syscall.ENOSYS
}