1 // Copyright 2012 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.
15 func maxListenerBacklog() int {
16 // The kernel does not track the limit.
17 return syscall
.SOMAXCONN
20 func listenerSockaddr(s
, f
int, la syscall
.Sockaddr
, toAddr
func(syscall
.Sockaddr
) Addr
) (syscall
.Sockaddr
, error
) {
25 switch v
:= a
.(type) {
26 case *TCPAddr
, *UnixAddr
:
27 err
:= setDefaultListenerSockopts(s
)
32 if v
.IP
.IsMulticast() {
33 err
:= setDefaultMulticastSockopts(s
)
40 case syscall
.AF_INET6
:
41 v
.IP
= IPv6unspecified