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 freebsd linux netbsd openbsd | 5 // +build darwin freebsd linux netbsd openbsd |
6 | 6 |
7 package net | 7 package net |
8 | 8 |
9 import ( | 9 import ( |
10 "errors" | 10 "errors" |
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
633 if err = syscall.SetNonblock(ns, false); err != nil { | 633 if err = syscall.SetNonblock(ns, false); err != nil { |
634 return nil, &OpError{"setnonblock", fd.net, fd.laddr, err} | 634 return nil, &OpError{"setnonblock", fd.net, fd.laddr, err} |
635 } | 635 } |
636 | 636 |
637 return os.NewFile(uintptr(ns), fd.sysfile.Name()), nil | 637 return os.NewFile(uintptr(ns), fd.sysfile.Name()), nil |
638 } | 638 } |
639 | 639 |
640 func closesocket(s int) error { | 640 func closesocket(s int) error { |
641 return syscall.Close(s) | 641 return syscall.Close(s) |
642 } | 642 } |
OLD | NEW |