github.com/code-reading/golang@v0.0.0-20220303082512-ba5bc0e589a3/go/src/net/rawconn_stub_test.go (about) 1 // Copyright 2018 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 //go:build (js && wasm) || plan9 6 // +build js,wasm plan9 7 8 package net 9 10 import ( 11 "errors" 12 "syscall" 13 ) 14 15 func readRawConn(c syscall.RawConn, b []byte) (int, error) { 16 return 0, errors.New("not supported") 17 } 18 19 func writeRawConn(c syscall.RawConn, b []byte) error { 20 return errors.New("not supported") 21 } 22 23 func controlRawConn(c syscall.RawConn, addr Addr) error { 24 return errors.New("not supported") 25 } 26 27 func controlOnConnSetup(network string, address string, c syscall.RawConn) error { 28 return nil 29 }