Source file
src/net/sock_windows.go
1
2
3
4
5 package net
6
7 import (
8 "internal/syscall/windows"
9 "os"
10 "syscall"
11 )
12
13 func maxListenerBacklog() int {
14
15
16
17 return syscall.SOMAXCONN
18 }
19
20 func sysSocket(family, sotype, proto int) (syscall.Handle, error) {
21 s, err := wsaSocketFunc(int32(family), int32(sotype), int32(proto),
22 nil, 0, windows.WSA_FLAG_OVERLAPPED|windows.WSA_FLAG_NO_HANDLE_INHERIT)
23 if err != nil {
24 return syscall.InvalidHandle, os.NewSyscallError("socket", err)
25 }
26 return s, nil
27 }
28
View as plain text