Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(118)

Delta Between Two Patch Sets: src/pkg/net/sockopt_linux.go

Issue 6460108: net: epoll dispatcher 2
Left Patch Set: diff -r 3181682928c9 https://dvyukov%40google.com@code.google.com/p/go/ Created 11 years, 7 months ago
Right Patch Set: diff -r f2755950769b https://dvyukov%40google.com@code.google.com/p/go/ Created 11 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/net/sock_posix.go ('k') | src/pkg/net/sockopt_posix.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 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 // Socket options for Linux 5 // Socket options for Linux
6 6
7 package net 7 package net
8 8
9 import ( 9 import (
10 "os" 10 "os"
(...skipping 10 matching lines...) Expand all
21 21
22 func setDeadlineImpl(fd *netFD, t time.Time, mode int) error { 22 func setDeadlineImpl(fd *netFD, t time.Time, mode int) error {
23 d := t.UnixNano() 23 d := t.UnixNano()
24 if t.IsZero() { 24 if t.IsZero() {
25 d = 0 25 d = 0
26 } 26 }
27 if err := fd.incref(false); err != nil { 27 if err := fd.incref(false); err != nil {
28 return err 28 return err
29 } 29 }
30 defer fd.decref() 30 defer fd.decref()
31 » runtime_setDeadlineFD(fd.pdesc, d, mode) 31 » runtime_setDeadlineFD(fd.pollServer, d, mode)
32 return nil 32 return nil
33 } 33 }
34 34
35 func setReadDeadline(fd *netFD, t time.Time) error { 35 func setReadDeadline(fd *netFD, t time.Time) error {
36 return setDeadlineImpl(fd, t, 'r') 36 return setDeadlineImpl(fd, t, 'r')
37 } 37 }
38 38
39 func setWriteDeadline(fd *netFD, t time.Time) error { 39 func setWriteDeadline(fd *netFD, t time.Time) error {
40 return setDeadlineImpl(fd, t, 'w') 40 return setDeadlineImpl(fd, t, 'w')
41 } 41 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 func setDefaultMulticastSockopts(s int) error { 76 func setDefaultMulticastSockopts(s int) error {
77 // Allow multicast UDP and raw IP datagram sockets to listen 77 // Allow multicast UDP and raw IP datagram sockets to listen
78 // concurrently across multiple listeners. 78 // concurrently across multiple listeners.
79 err := syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_REUSEADDR , 1) 79 err := syscall.SetsockoptInt(s, syscall.SOL_SOCKET, syscall.SO_REUSEADDR , 1)
80 if err != nil { 80 if err != nil {
81 return os.NewSyscallError("setsockopt", err) 81 return os.NewSyscallError("setsockopt", err)
82 } 82 }
83 return nil 83 return nil
84 } 84 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b