github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/net/internal/socktest/sys_windows.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 package socktest 6 7 import ( 8 "github.com/shogo82148/std/syscall" 9 ) 10 11 // WSASocket wraps [syscall.WSASocket]. 12 func (sw *Switch) WSASocket(family, sotype, proto int32, protinfo *syscall.WSAProtocolInfo, group uint32, flags uint32) (s syscall.Handle, err error) 13 14 // Closesocket wraps [syscall.Closesocket]. 15 func (sw *Switch) Closesocket(s syscall.Handle) (err error) 16 17 // Connect wraps [syscall.Connect]. 18 func (sw *Switch) Connect(s syscall.Handle, sa syscall.Sockaddr) (err error) 19 20 // ConnectEx wraps [syscall.ConnectEx]. 21 func (sw *Switch) ConnectEx(s syscall.Handle, sa syscall.Sockaddr, b *byte, n uint32, nwr *uint32, o *syscall.Overlapped) (err error) 22 23 // Listen wraps [syscall.Listen]. 24 func (sw *Switch) Listen(s syscall.Handle, backlog int) (err error) 25 26 // AcceptEx wraps [syscall.AcceptEx]. 27 func (sw *Switch) AcceptEx(ls syscall.Handle, as syscall.Handle, b *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, rcvd *uint32, overlapped *syscall.Overlapped) error