github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/net/internal/socktest/sys_unix.go (about) 1 // Copyright 2015 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 unix || (js && wasm) || wasip1 6 7 package socktest 8 9 import "github.com/shogo82148/std/syscall" 10 11 // Socket wraps [syscall.Socket]. 12 func (sw *Switch) Socket(family, sotype, proto int) (s int, err error) 13 14 // Close wraps syscall.Close. 15 func (sw *Switch) Close(s int) (err error) 16 17 // Connect wraps syscall.Connect. 18 func (sw *Switch) Connect(s int, sa syscall.Sockaddr) (err error) 19 20 // Listen wraps syscall.Listen. 21 func (sw *Switch) Listen(s, backlog int) (err error) 22 23 // Accept wraps syscall.Accept. 24 func (sw *Switch) Accept(s int) (ns int, sa syscall.Sockaddr, err error) 25 26 // GetsockoptInt wraps syscall.GetsockoptInt. 27 func (sw *Switch) GetsockoptInt(s, level, opt int) (soerr int, err error)