OLD | NEW |
1 // Copyright 2009 The Go Authors. All rights reserved. | 1 // Copyright 2009 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 // +build darwin dragonfly freebsd linux netbsd openbsd windows | 5 // +build darwin dragonfly freebsd linux nacl netbsd openbsd windows |
6 | 6 |
7 package net | 7 package net |
8 | 8 |
9 import ( | 9 import ( |
10 "io" | 10 "io" |
11 "os" | 11 "os" |
12 "syscall" | 12 "syscall" |
13 "time" | 13 "time" |
14 ) | 14 ) |
15 | 15 |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } | 289 } |
290 if laddr == nil { | 290 if laddr == nil { |
291 laddr = &TCPAddr{} | 291 laddr = &TCPAddr{} |
292 } | 292 } |
293 fd, err := internetSocket(net, laddr, nil, noDeadline, syscall.SOCK_STRE
AM, 0, "listen", sockaddrToTCP) | 293 fd, err := internetSocket(net, laddr, nil, noDeadline, syscall.SOCK_STRE
AM, 0, "listen", sockaddrToTCP) |
294 if err != nil { | 294 if err != nil { |
295 return nil, &OpError{Op: "listen", Net: net, Addr: laddr, Err: e
rr} | 295 return nil, &OpError{Op: "listen", Net: net, Addr: laddr, Err: e
rr} |
296 } | 296 } |
297 return &TCPListener{fd}, nil | 297 return &TCPListener{fd}, nil |
298 } | 298 } |
OLD | NEW |